Home > Default > ABAP Routine  for 0FISCPER  select data in InfoPackage

ABAP Routine  for 0FISCPER  select data in InfoPackage

October 11Hits:1
Advertisement
Hi all,
I need to write a routine which has to return values from the last FISCPER to the current FISCPER in the data selection of the infopackage.
Do somebody already do it?
Thks

Answers

Try this:
Global Declarations
CONSTANTS: c_1(1) TYPE n VALUE 1,
           c_fiscvarnt TYPE /bi0/oifiscvarnt VALUE 'Z1',  "Use whatever your default Fiscal Year Variant is"
           c_i(1) TYPE c VALUE 'I',
           c_bt(2) TYPE c VALUE 'BT'.
DATA: l_tabix LIKE sy-tabix,
      l_fiscper3 TYPE /bi0/oifiscper3,
      l_fiscyear TYPE /bi0/oifiscyear,
      l_min TYPE /bi0/oifiscper,
      l_max LIKE /bi0/oifiscper.
Routine
CLEAR: l_fiscper3,
       l_fiscyear.
CALL FUNCTION
  'DATE_TO_PERIOD_CONVERT'
EXPORTING
  i_date  = sy-datum
  i_periv = c_fiscvarnt
IMPORTING
  e_buper = l_fiscper3
  e_gjahr = l_fiscyear.
CONCATENATE: l_fiscyear l_fiscper3 INTO l_max.
l_fiscper3 = l_fiscper3 - c_1.
IF l_fiscper3 LT 1.
  l_fiscyear = l_fiscyear - c_1.
  l_fiscper3 = c_1.
ENDIF.
CONCATENATE: l_fiscyear l_fiscper3 INTO l_min.
READ TABLE
  l_t_range
WITH KEY
  fieldname = 'FISCPER'.
MOVE: sy-tabix TO l_tabix,
      c_i TO l_t_range-sign,
      c_bt TO l_t_range-option,
      l_min TO l_t_range-low,
      l_max TO l_t_range-high.
MODIFY
  l_t_range
INDEX
  l_tabix.
p_subrc = 0.
Edited by: Dennis Scoville on Dec 7, 2009 11:07 AM

Read other 2 answers

Tags:

Related Articles

  • ABAP Routine  for 0FISCPER  select data in InfoPackageOctober 11

    Hi all, I need to write a routine which has to return values from the last FISCPER to the current FISCPER in the data selection of the infopackage. Do somebody already do it? ThksTry this: Global Declarations CONSTANTS: c_1(1) TYPE n VALUE 1,        

  • ABAP Routine  for 0FISCPER  slect options in InfoPackageOctober 11

    Hi, I am trying to write an ABAP Routine for 0FISCPER as select options (range) dynamically. Ex: 0FISCPER selection for this year as 001.2008 to 012.2008 0FISCPER selection for next year as 001.2009 to 012.2009. Now  we are changing InfoPackage every

  • Excluding Value Range - ABAP Routine at Infopakage SelectionNovember 30

    Hi, In Production the volume of data is very high, I m splitting the data based on Material No. 000000000000 - 4ZZZZZZZZZ, 500000000000 - 8ZZZZZZZZZ, 900000000000 - FFFFFFFFFFFFF, and the remaining Material No.s. I created seperate InfoPaks for the m

  • ABAP OO:  Duplication of selected data in created objects?October 11

    I am new to ABAP OO and I have a conceptual question/concern that I cannot resolve.  Can someone explain what I am missing? I would think that selecting and storing (in internal tables) a large amount of data from many related database tables and, at

  • ABAP routine for loading data of current month in InfoPackageOctober 11

    Hello experts, I want to load data of current month. Therefore I implemented the following ABAP-Routine for field 0CALDAY in the InfoPackage's data selection: data: lv_datum_l like sy-datum,          lv_datum_h like sy-datum.    concatenate sy-datum(

  • ABAP Routine at infopackage dataselectionOctober 11

    I got one scenario to use ABAP Code. In data selections we have CALWEEK. We are loading to from flatfile to cube.Every week we load the data to cube. If the flat file week=present week(sys week) then update to cube or else fail.Hello, In infopackage

  • Data selection tab of infopackageNovember 30

    hi all, how do we select data from infopackage if you do not want a certain value? I wrote ABAP code to select not as: L_t_RANGE-SIGN = 'I'. L_t_RANGE-option = 'NE'. L_t_RANGE-low = 'Y'. But I got errors. Sign 'I' with 'NE' is not allowed. Please adv

  • ABAP Routine in the Infopackage data selectionOctober 11

    All, I have requirement where i need to write a routine on a Date field(Activity Year Month) which has to return values from the first to the last day of the Previous month in the data selection of the infopackage. I know that on Date there is a STD

  • How to debug a ABAP Routine which is in Infopackage Data selection TabOctober 11

    Hi ,    Please let me know How to debug a ABAP Routine which is in Infopackage Data selection Tab.Hi, You can try to create infinite loop: DATA: STOP. WHILE STOP IS INITIAL. ENDWHILE. Start InfoPackage and then go to SM50 and swich on debugging for y

  • Abap Routine for Date selection in InfopackageOctober 11

    Hi I have to write an abap routine for date selections in the infopackage, There are two date begda and enda. Do i code for BEGDA and fill in the begin date using routine and use another routine to fill the ENDA. JPJPHi JP,   If you have two info obj

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.661 s.