2011 Sep 23 6:31 AM
1.Parameter id for these fields.Those fields data elements are not having parameter id. It also not present in DD04L table.
GVTYP,
KTOKS,
BUDAT,
ALLGSTID.
2.How to pass range of values to the FBL3N Tcode field ALLGSTID.
Thanks.
2011 Sep 23 7:35 AM
Try to perform some where used on FBL3N transaction and RFITEMGL report to see how Sap manages the call themselves.
Is not ALLGSTID (pa_stida or pa_stid2) the date of evaluation of the clearing status, i don't understand how a range of dates can be used here. Can you explain your exact requirement or do you need to use so_augdt (date of clearing) ?
Regards,
Raymond
2011 Sep 23 7:10 AM
- Did you try to SUBMIT the report behind (RFITEMGL) ?
- Did you try a CALL TRANSACTION USING bdcdata tab ?
Regards,
Raymond
2011 Sep 23 7:25 AM
No Raymond.My lead said,we cant use submit for standard program.Is it possible to use.I'll try.
Thanks.
2011 Sep 23 7:35 AM
Try to perform some where used on FBL3N transaction and RFITEMGL report to see how Sap manages the call themselves.
Is not ALLGSTID (pa_stida or pa_stid2) the date of evaluation of the clearing status, i don't understand how a range of dates can be used here. Can you explain your exact requirement or do you need to use so_augdt (date of clearing) ?
Regards,
Raymond
2011 Sep 23 7:41 AM
Raymond,
For example,Date has been given in select option.From 01/mar/2001 to 30/mar/2001.
2011 Sep 23 8:01 AM
I understand what a date range is
But this field is "date of evaluation of clearing status", how do you define for an accounting document item that it was cleared/not-cleared between from and to date, eg. if an item was cleared on 15/mar/2011 for your range, shall you display it or not, for me it is not logically solvable, not programmable...
2011 Sep 23 9:31 AM
Raymond,
The requirement is ,to display the G/L report for specific month.So i've to find the posting has done in the period of March or April.
2011 Sep 23 9:40 AM
Hi
That means you should use the posting date as selection parameters (SO_BUDAT) and set the radiobutton ALL ITEM (X_AISEL)
I don't know why you can't use the SUBMIT statament, so I believe you can only use the CALL TRANSACTION with batchinput options, because I don't believe it can transfer the value of that select-option by SET/GET PARAMETER
Max
Edited by: max bianchi on Sep 23, 2011 10:57 AM
2011 Sep 23 10:00 AM
Max,
That's fine.I've got SO_BUDAT using selection screen.Now i want to pass this values to FBL3N.How to pass those select-option values using set parameter id.
Thanks
2011 Sep 23 10:01 AM
Try a
SUBMIT rfitemgl
WITH so_budat BETWEEN start_of_accounting_period AND end_of_accounting_period
WITH x_aisel EQ 'X'
WITH x_clsel EQ space " Unset other radiobuttons of group
WITH x_opsel EQ space
...
You cannot use parameter-id if called report don't manage those, If you are really obliged to use CALL TRANSACTION then put those value in a BDCDATA internal table and use a [USING bdc_tab|http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSACTION.htm#&ABAP_ADDITION_2@2@] option.
Regards,
Raymond
2011 Sep 23 10:09 AM
Hi
Raymond has written the right way.....but you wan't or can't to use SUBMIT statament.....I don't know why
So u need to create a BDC with CALL TRANSACTION
Max
2011 Sep 23 10:12 AM
2011 Sep 23 10:15 AM
Hi Balamurugan,
Did you try the logic which I have given ? It is working with submit program.
Regards,
Danish.
2011 Sep 23 10:20 AM
Hi
IF you also want to try a CALL TRANSACTION, try something like that:
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
PERFORM BDC_DYNPRO USING 'RFITEMGL' '1000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ONLI'.
PERFORM BDC_FIELD USING 'SD_SAKNR-LOW'
<G/L ACCOUNT>.
PERFORM BDC_FIELD USING 'SD_BUKRS-LOW'
<COMPANY CODE>.
PERFORM BDC_FIELD USING 'X_AISEL'
'X'.
PERFORM BDC_FIELD USING 'SO_BUDAT-LOW'
<FROM POSTING DATE>.
PERFORM BDC_FIELD USING 'SO_BUDAT-HIGH'
<TO POSTING DATE>.
CALL TRANSACTION 'FB23N' USING BDCDATA
MODE 'E'
UPDATE 'S'.
*----------------------------------------------------------------------*
* Start new screen *
*----------------------------------------------------------------------*
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. "BDC_DYNPRO
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> '/'.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM. "BDC_FIELD
Max
2011 Sep 23 10:24 AM
submit RFITEMGL
WITH SD_SAKNR-LOW = it_drill-racct
with SD_BUKRS-LOW = so_bukrs-low
with SO_BUDAT between '20110701' and '20110730'
and return.
Hi Danish,
I've given like the above.But date value is not passing.But error in date format.
2011 Sep 23 10:47 AM
Hi,
Please pass exactly in the similar way in which I have given.
* For Company Code
wa_rsparams-selname = 'SD_BUKRS'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = '1000'.
APPEND wa_rsparams TO it_rsparams.
* GL Account
wa_rsparams-selname = 'SD_SAKNR'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = '16413100'.
APPEND wa_rsparams TO it_rsparams.
* For Displaying All Items, deselect the radiobutton for Open Items.
wa_rsparams-selname = 'X_OPSEL'.
wa_rsparams-kind = 'P'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = ' '.
APPEND wa_rsparams TO it_rsparams.
* Select Radiobutton for ALL Items
wa_rsparams-selname = 'X_AISEL'.
wa_rsparams-kind = 'P'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = 'X'.
APPEND wa_rsparams TO it_rsparams.
* Posting Date for All Items.
wa_rsparams-selname = 'SO_BUDAT'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'BT'.
wa_rsparams-low = '20110701'.
wa_rsparams-high = '20110730'.
APPEND wa_rsparams TO it_rsparams.
SUBMIT rfitemgl WITH SELECTION-TABLE it_rsparams[] AND RETURN.
Regards,
Danish.
Edited by: Danish2285 on Sep 23, 2011 3:22 PM
2011 Sep 23 10:55 AM
Hi Danish
Your solution is ok just as one indicated by Raimond
There are several ways to do a SUBMIT and all methods work fine
Now here the problem is (or was) to understand why it can't use SUBMIT statament
But now it seems he can use it
Max
2011 Sep 23 10:59 AM
Yes Max, now I guess it should be easier for him to use it. ABAP Logic is not complex, it is just very tricky.
Regards,
Danish.
2011 Sep 23 11:05 AM
Danish & Max,
I used submit to pass Business area( GSBER) to FBL3N in range.But its not taking.
I think Business Area,Posting date are in sub screen that's why its not taking for RFITEMGL program.
2011 Sep 23 11:05 AM
He wrote
My lead said,we cant use submit for standard program
which puzzled me
Regards,
Raymond
2011 Sep 23 11:09 AM
Are those free-selection fields, then use a [WITH FREE SELECTIONS|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#&ABAP_ADDITION_5@5@] option (use FREE_SELECTIONS_RANGE_2_EX to fill parameter)
Regards,
Raymond
2011 Sep 23 11:13 AM
2011 Sep 23 11:14 AM
2011 Sep 23 11:15 AM
Hi
I don't believe GSBER is available in the selection-screen, but probably (as Raimond has explained) is in the free selection
The report RFITEMGL uses the database logic SDF, and here the business area is available in free selection.
The free selection has to be managed in a particular way, see the link indicated by Raimond
Max
2011 Sep 23 11:19 AM
TYPE-POOLS RSDS.
DATA: TRANGE TYPE RSDS_TRANGE,
TRANGE_LINE
LIKE LINE OF TRANGE,
TRANGE_FRANGE_T_LINE
LIKE LINE OF TRANGE_LINE-FRANGE_T,
TRANGE_FRANGE_T_SELOPT_T_LINE
LIKE LINE OF TRANGE_FRANGE_T_LINE-SELOPT_T,
TEXPR TYPE RSDS_TEXPR.
trange_line-tablename = 'BSIS'.
trange_frange_t_line-fieldname = 'GSBER'.
trange_frange_t_selopt_t_line-sign = 'I'.
trange_frange_t_selopt_t_line-option = 'EQ'.
trange_frange_t_selopt_t_line-low = <BUSINESS AREA>
APPEND trange_frange_t_selopt_t_line TO trange_frange_t_line-selopt_t.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
SUBMIT RFITEMGL WITH FREE SELECTIONS texpr
WITH SD_SAKNR-LOW = .........
with SD_BUKRS-LOW = ............
with SO_BUDAT between ..............
and return.
Max
2011 Sep 23 11:28 AM
2011 Sep 23 2:24 PM
wa_trange-tablename = 'SKA1'.
wa_frange-fieldname = 'GVTYP'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'EQ'.
wa_selopt-low = 'X'.
wa_selopt-high = ''.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
APPEND wa_trange TO it_trange.
wa_trange-tablename = 'SKA1'.
wa_frange-fieldname = 'KTOKS'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'EQ'.
wa_selopt-low = so_ktoks-low.
wa_selopt-high = so_ktoks-high.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
APPEND wa_trange TO it_trange.
wa_trange-tablename = 'BSIS'.
wa_frange-fieldname = 'BUDAT'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'BT'.
wa_selopt-low = '20110701'.
wa_selopt-high = '20110730'.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
APPEND wa_trange TO it_trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = it_trange[]
IMPORTING
expressions = it_texpr.
SUBMIT rfitemgl via selection-screen
WITH sd_saknr-low = it_drill-racct
WITH sd_bukrs-low = so_bukrs-low
with XOPSEL = 'X'
with PA_STIDA = so_stida-low
WITH FREE SELECTIONS it_texpr
and return .
Max,Danish,Bala,
I've given the above code.But its not assigning value for dynamic selection fields.It only assign for BUKRS,SAKNR.
2011 Sep 23 2:41 PM
Look at FORM show_gl_account_fi_items in INCLUDE LFDIS3F01 to see how SAP do this (transfer free selection and other parameters to RFITEMGL).
Regards,
Raymond
2011 Sep 23 2:46 PM
TYPE-POOLS RSDS.
DATA: TRANGE TYPE RSDS_TRANGE,
TRANGE_LINE LIKE LINE OF TRANGE,
TRANGE_FRANGE_T_LINE LIKE LINE OF TRANGE_LINE-FRANGE_T,
TRANGE_FRANGE_T_SELOPT_T_LINE
LIKE LINE OF TRANGE_FRANGE_T_LINE-SELOPT_T,
TEXPR TYPE RSDS_TEXPR.
TRANGE_LINE-TABLENAME = 'SKA1'.
TRANGE_FRANGE_T_LINE-FIELDNAME = 'GVTYP'.
TRANGE_FRANGE_T_SELOPT_T_LINE-SIGN = 'I'.
TRANGE_FRANGE_T_SELOPT_T_LINE-OPTION = 'EQ'.
TRANGE_FRANGE_T_SELOPT_T_LINE-LOW = 'X'.
APPEND TRANGE_FRANGE_T_SELOPT_T_LINE TO TRANGE_FRANGE_T_LINE-SELOPT_T.
APPEND TRANGE_FRANGE_T_LINE TO TRANGE_LINE-FRANGE_T.
APPEND TRANGE_LINE TO TRANGE.
CLEAR TRANGE_LINE.
CLEAR TRANGE_FRANGE_T_LINE-SELOPT_T.
TRANGE_LINE-TABLENAME = 'BSIS'.
TRANGE_FRANGE_T_LINE-FIELDNAME = 'BUDAT'.
TRANGE_FRANGE_T_SELOPT_T_LINE-SIGN = 'I'.
TRANGE_FRANGE_T_SELOPT_T_LINE-OPTION = 'BT'.
TRANGE_FRANGE_T_SELOPT_T_LINE-LOW = '20110701'.
TRANGE_FRANGE_T_SELOPT_T_LINE-HIGH = '20110730'.
APPEND TRANGE_FRANGE_T_SELOPT_T_LINE TO TRANGE_FRANGE_T_LINE-SELOPT_T.
APPEND TRANGE_FRANGE_T_LINE TO TRANGE_LINE-FRANGE_T.
APPEND TRANGE_LINE TO TRANGE.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
FIELD_RANGES = TRANGE
IMPORTING
EXPRESSIONS = TEXPR.
SUBMIT RFITEMGL VIA SELECTION-SCREEN
WITH FREE SELECTIONS TEXPR
WITH SD_SAKNR = '100000'
WITH SD_BUKRS = 'MAX'
WITH XOPSEL = 'X'
WITH PA_STIDA = SY-DATUM
AND RETURN . .
This works fine, but posting date and account type are in free selection (so press the icon with color red, green and blue)
Max
2011 Sep 24 3:35 PM
Max,
I used like what you have given.But its not showing the dynamic selection button(Colour button).The values are passed only for the selection screen fields like G/L no,Company code not for Posting date,Business area in free selection screen.
Please help me to resolve this issue.
Thanks.
2011 Sep 24 3:53 PM
2011 Sep 24 4:14 PM
wa_trange-tablename = 'SKA1'.
wa_frange-fieldname = 'GVTYP'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'EQ'.
wa_selopt-low = 'X'.
wa_selopt-high = ''.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
APPEND wa_trange TO it_trange.
wa_trange-tablename = 'SKA1'.
wa_frange-fieldname = 'KTOKS'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'EQ'.
wa_selopt-low = so_ktoks-low.
wa_selopt-high = so_ktoks-high.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
APPEND wa_trange TO it_trange.
wa_trange-tablename = 'BSIS'.
wa_frange-fieldname = 'BUDAT'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'BT'.
wa_selopt-low = '20110701'.
wa_selopt-high = '20110730'.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
APPEND wa_trange TO it_trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = it_trange[]
IMPORTING
expressions = it_texpr.
SUBMIT rfitemgl via selection-screen
WITH sd_saknr-low = so_saknr
WITH sd_bukrs-low = so_bukrs-low
with XOPSEL = 'X'
with PA_STIDA = sy-datum
WITH FREE SELECTIONS it_texpr
and return .
Max,
Please help me.
Thanks.
2011 Sep 26 5:38 AM
2011 Sep 26 7:58 AM
2011 Sep 26 8:46 AM
Hi
I've seen you have solved by yourself, I suppose your modification are like following:
wa_trange-tablename = 'SKA1'.
wa_frange-fieldname = 'GVTYP'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'EQ'.
wa_selopt-low = 'X'.
wa_selopt-high = ''.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
REFRESH wa_frange-selopt_t.
CLEAR wa_frange.
wa_frange-fieldname = 'KTOKS'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'BT'.
wa_selopt-low = so_ktoks-low.
wa_selopt-high = so_ktoks-high.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
APPEND wa_trange TO it_trange.
REFRESH wa_frange-selopt_t.
REFRSH wa_trange-frange_t.
CLEAR wa_frange.
wa_trange-tablename = 'BSIS'.
wa_frange-fieldname = 'BUDAT'.
wa_selopt-sign = 'I'.
wa_selopt-option = 'BT'.
wa_selopt-low = '20110701'.
wa_selopt-high = '20110730'.
APPEND wa_selopt TO wa_frange-selopt_t.
APPEND wa_frange TO wa_trange-frange_t.
APPEND wa_trange TO it_trange.
Max
2011 Sep 23 10:01 AM
Hi,
You can use the following code.
Also, you cannot pass range of values in the Open at Key Date (ALLGSTID) as this is a parameter and not select-options in FBL3N.
DATA: it_rsparams TYPE TABLE OF rsparams,
wa_rsparams LIKE LINE OF it_rsparams.
wa_rsparams-selname = 'SD_BUKRS'. " Company Code
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = '1000'.
APPEND wa_rsparams TO it_rsparams.
CLEAR: wa_rsparams.
wa_rsparams-selname = 'PA_STIDA'. " Open at Key Date : Data Element - ALLGSTID
wa_rsparams-kind = 'P'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = '20110923'.
APPEND wa_rsparams TO it_rsparams.
SUBMIT rfitemgl WITH SELECTION-TABLE it_rsparams[] AND RETURN.
Regards,
Danish.