‎2009 Jul 23 3:17 PM
I have recorded the transaction FS00 for creating a GL for a company code. When I run the BDC the create screen is not coming. When I manually click on create button then the whole BDC program is running fine.
please help.
Regards,
Sriram
‎2009 Jul 23 3:29 PM
You forget/lost an OK_CODE like ACC_CRE in your SHDB before/after generating the report.
The report should begin with
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_KEY-BUKRS'.
perform bdc_field using 'BDC_OKCODE'
'=ACC_CRE'. " should be missing
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-SAKNR'
record-<account>.
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-BUKRS'
record-<company>.Regards,
Raymond
‎2009 Jul 23 3:29 PM
You forget/lost an OK_CODE like ACC_CRE in your SHDB before/after generating the report.
The report should begin with
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_KEY-BUKRS'.
perform bdc_field using 'BDC_OKCODE'
'=ACC_CRE'. " should be missing
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-SAKNR'
record-<account>.
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-BUKRS'
record-<company>.Regards,
Raymond
‎2009 Jul 24 5:14 AM
Thanks for the reply. But if I include the following code, it gives message as enter GL account. Again, once I manually click on create button the BDC program is running. I don't know what is the code to click on create button or copy button.
perform bdc_field using 'BDC_OKCODE'
'=ACC_CRE'.
‎2009 Jul 24 5:20 AM
My whole BDC code is as follows. Where should I make changes.
perform open_group.
LOOP AT T_XK01 INTO W_XK01.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 120 1'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_KEY-SAKNR'.
perform bdc_dynpro using 'SAPLSPO4' '0300'.
perform bdc_field using 'BDC_CURSOR'
'SVALD-VALUE(01)'.
perform bdc_field using 'BDC_OKCODE'
'=FURT'.
perform bdc_field using 'SVALD-VALUE(01)'
W_XK01-COCD.
perform bdc_dynpro using 'SAPLSPO4' '0300'.
perform bdc_field using 'BDC_CURSOR'
'SVALD-VALUE(02)'.
perform bdc_field using 'BDC_OKCODE'
'=FURT'.
perform bdc_field using 'SVALD-VALUE(01)'
W_XK01-GLNO.
perform bdc_field using 'SVALD-VALUE(02)'
W_XK01-COCD.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=2102_BS_PL'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-XBILK'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XPLACCT'
W_XK01-XPLACCT.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
W_XK01-XBILK.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=2102_GROUP'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-KTOKS'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
W_XK01-KTOKS.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
W_XK01-XBILK.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=TAB02'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
W_XK01-KTOKS.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
W_XK01-XBILK.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-TXT50_ML'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
W_XK01-TXT20_ML.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
W_XK01-TXT50_ML.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=TAB03'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-WAERS'
W_XK01-WAERS.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XSALH'
W_XK01-XSALH.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XMWNO'
W_XK01-XMWNO.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-ZUAWA'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XKRES'
W_XK01-XKRES.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
W_XK01-ZUAWA.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
W_XK01-FSTAG.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XGKON'
W_XK01-XGKON.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-ZINRT'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-ZINRT'
W_XK01-ZINRT.
perform bdc_transaction using 'FS00'.
ENDLOOP.
perform close_group.
‎2009 Jul 24 7:49 AM
You report must begin with tbe five statements i wrote above, this is the initial screen where account and company are input, cursor is set and ok_code for creation is activated.
For the OK_CODE, run a SHDB session or look at status MAIN of SAPLGL_ACCOUNT_MASTER_MAINTAIN (via system/status) - ACC_CRE for create and ACC_CRER for create with template.
Regards,
Raymond
‎2009 Jul 24 10:55 AM
Please see the following code. When I execute the program I get the message "Enter Account".
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=ACC_CRE'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_KEY-SAKNR'.
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-SAKNR'
W_XK01-GLNO.
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-BUKRS'
W_XK01-COCD.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=2102_BS_PL'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-XBILK'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XPLACCT'
W_XK01-XPLACCT.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
W_XK01-XBILK.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=2102_GROUP'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-KTOKS'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
W_XK01-KTOKS.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
W_XK01-XBILK.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=TAB02'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
W_XK01-KTOKS.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
W_XK01-XBILK.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-TXT50_ML'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
W_XK01-TXT20_ML.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
W_XK01-TXT50_ML.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=TAB03'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-WAERS'
W_XK01-WAERS.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XSALH'
W_XK01-XSALH.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XMWNO'
W_XK01-XMWNO.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-ZUAWA'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XKRES'
W_XK01-XKRES.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
W_XK01-ZUAWA.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
W_XK01-FSTAG.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XGKON'
W_XK01-XGKON.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-ZINRT'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-ZINRT'
W_XK01-ZINRT.
perform bdc_transaction using 'FS00'.
‎2009 Jul 24 1:23 PM
Thanks for the help. I used FS01 and recorded. Now its working.
‎2009 Jul 24 5:58 AM
Hi sriram,
I think u have made mistake in recording .
first four lines should be like this.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=ACC_CRE'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_KEY-SAKNR'.
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-SAKNR'
record-SAKNR_001. *here u can replace ur value i.e gl account IN UR CASE W_XK01-SAKNR
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-BUKRS'
record-BUKRS_002. * here u can replace with company code in run time.W_XK01-BUKRS
ENTER SOME VALUE IN FIELD AND PRESS CREATE BUTTON.
i have a small doubt u had a ok code like
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE' '=%_GC 120 1'.
WAT OK_CODE IS THIS .
Regards,
vinod.
Neccessity is the mother of invention.
‎2009 Jul 24 6:07 AM
Thanks very much for your reply. I got the recording from my FI consultant. So I created the program with that code. I don't know what OK-Code is '=%_GC 120 1'.
The code you have given should I still click the create button manually? What if I want to run it as background processing.
Is there a way to copy GL from one company code to another.
Thanks & Regards,
Sriram.
‎2009 Jul 24 2:03 PM
‎2016 Mar 03 2:45 AM
The OKCODE = '%_GC 120 1' you get is when you perform recording in FS00 / FSP0 / FSS0 where your display is in the form of a navigation tree.
The OKCODE = 'ACC_CRE' you get is when you perform recording in FS00 / FSP0 / FSS0 where your display is NOT in the form of a navigation tree.
Perform your recording where your default display of FS00 / FSP0 / FSS0 is NOT in the form of a navigation tree.