2008 Nov 21 5:08 AM
Hi all,
I am developing BDC for G/L Account using transaction FS00
There i got some problem:
1. program working fine for first record of text file (i am using Tab Delimeter text file for upload)
but when it goes for next loop iteration, then current loop value for G/L account number is not
reflecting in FS00 transaction....instead of it is taking preveous G/L accout number. so at every
execution only single record get uploaded.
i also tried to set G/L account number using 'SET PARAMETER ID' statement...but not working
I also tried LSMW for G/L account using standard batch object 0010 Method 0002
but problem i got:
1. LSMW working fine uptill step 14....at step 15 it is calling program 'RFBISA00' ...in which i am passing
File Path Name (path of file on desktop) and marked 'Check File Only'
after execution, program giving message --> 'File (path name) could not be opened'
and at last step i cant see any session created
Questions:
1. Which is a proper way for G/L uploading ? BDC or we have to use standard input method ?
2. Which parameters i have to pass in program 'RFBISA00'
3. How to set new G/L account number from iternal table to transaction FS00 ?
Hi all,
I am developing BDC for G/L Account using transaction FS00
There i got some problem:
1. program working fine for first record of text file (i am using Tab Delimeter text file for upload)
but when it goes for next loop iteration, then current loop value for G/L account number is not
reflecting in FS00 transaction....instead of it is taking preveous G/L accout number. so at every
execution only single record get uploaded.
i also tried to set G/L account number using 'SET PARAMETER ID' statement...but not working
I also tried LSMW for G/L account using standard batch object 0010 Method 0002
but problem i got:
1. LSMW working fine uptill step 14....at step 15 it is calling program 'RFBISA00' ...in which i am passing
File Path Name (path of file on desktop) and marked 'Check File Only'
after execution, program giving message --> 'File (path name) could not be opened'
and at last step i cant see any session created
Questions:
1. Which is a proper way for G/L uploading ? BDC or we have to use standard input method ?
2. Which parameters i have to pass in program 'RFBISA00'
3. How to set new G/L account number from iternal table to transaction FS00 ?
2008 Nov 21 5:17 AM
Hi
Can I see the BDC code here? I think there is problem with the Loop you are running.
Vishwa.
2008 Nov 21 6:53 AM
Hi Vishwa,
please find below code and revert back to me if some more clarification needed.
by the way... my problem with LSMW has been resolved
What i did -->
1. instead of giving program generated file path with .lsmw.conv, by mistake i gave path name of my text file stored on Desktop.
2. Marked 'File without Session Record' and Unmarked 'Check File Only'
LOOP AT it_gl_acct.
gd_retcode = 0.
IF gd_flag EQ 'X'.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
'2001'.
* PERFORM bdc_field USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
* ' '. "'200003'
* PERFORM bdc_field USING 'GLACCOUNT_SCREEN_KEY-BUKRS'
* ' '. "'5001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=OTHER'.
ENDIF.
gd_flag = 'X'.
SET PARAMETER ID: 'SAK' FIELD it_gl_acct-saknr,
'BUK' FIELD it_gl_acct-bukrs.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
'2001'.
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'GLACCOUNT_SCREEN_KEY-BUKRS'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
it_gl_acct-saknr. "'200003'
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_KEY-BUKRS'
it_gl_acct-bukrs. "'5001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ACC_CRE'.
* Tab 1
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
'2001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=2102_GROUP'.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
'2001'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-KTOKS'
it_gl_acct-ktoks. "'LIAB'.
IF ( it_gl_acct-gvtyp = '' AND it_gl_acct-xbilk = '' ) OR
( it_gl_acct-gvtyp = 'X' AND it_gl_acct-xbilk = 'X' ).
gd_str = text-001.
REPLACE '&' IN gd_str WITH it_gl_acct-saknr.
MOVE gd_str TO listtab-listline.
APPEND listtab.
gd_retcode = 4.
ELSE.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
it_gl_acct-gvtyp. "''.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-XBILK'
it_gl_acct-xbilk. "'X'.
ENDIF.
PERFORM bdc_field USING 'BDC_OKCODE'
'=2102_BS_PL'.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
'2001'.
* PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-KTOKS'
* 'LIAB'.
* PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-XBILK'
* 'X'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
it_gl_acct-txt20. "'General Reserve'
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
it_gl_acct-txt50. "'General Reserve'
PERFORM bdc_field USING 'BDC_OKCODE'
'=TAB02'.
* Tab 2
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
'2001'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-WAERS'
it_gl_acct-waers. "'INR'
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'GLACCOUNT_SCREEN_CCODE-ZUAWA'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'
it_gl_acct-mitkz.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'
it_gl_acct-xopvw. "''.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-XKRES'
it_gl_acct-xkres. "'X'
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
it_gl_acct-zuawa. "'002'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TAB03'.
* Tab 3
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
'2001'.
PERFORM bdc_field USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-FSTAG'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-FSTAG'
it_gl_acct-fstag. "'G001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
* Screen 100
PERFORM bdc_dynpro USING 'SAPLSPO1' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '=SAVE'.
*
* PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
* '2001'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '=BACK'.
CHECK gd_retcode = 0.
IF s_call = 'X'.
PERFORM call_transaction.
ENDIF.
IF s_sess = 'X'.
PERFORM call_session.
ENDIF.
ENDLOOP.
2008 Nov 21 6:38 AM
Hi,
Both BDC and LSMW are feasible for this GL Upload.
The mistake u did in BDC is u forgot to refresh BDCDATA table after each and every call.
that means, after CALL Transaction.... Use REFRESH BDCDATA. it will resolve ur problem.
Instead better u use recording in LSMW, then u will not face this problem, as LSMW automatically handles this.
2008 Nov 22 6:15 AM
problem resolved....after giving 'REFRESH bdctab'
thanks....for help
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |