Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in BDC

Former Member
0 Likes
1,091

Hello Friends,

iam doing BDC for F-02 . i have done recording and wrote program also. in it_bdcdata table I have records for 302 screen . but when i process the session it is giving an error that no batchsession for 302 screen.please tell me what might be the problem....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,036

Hi praja,

once check the recording or rerecord. May be the screen sequence has been missing while recording. Be careful while recording.

Rgds,

gsaa..

9 REPLIES 9
Read only

former_member438956
Active Participant
0 Likes
1,036

Hi prajak,

When u try to run the BDC prog in Background, if u try to input data in a greyed out fld then the prog terminates the transaction and returns success message saying "No batch input data for scree <screenno>". Try to run the program in All screen mode(A) or Display errors(E) and then chk at wht screen the prob is and modify the prog accordingly.

Regards,

Anil N.

Read only

0 Likes
1,036

hi anil thanks for reply...

iam running it in foreground only...i have not taken values that are greye out...iam putting cursor direcly on the field where i want to enter data....

Read only

0 Likes
1,036

hi,

can u paste ur BDC code thr which u r trying to upload the data. Are u specifying the update mode for running the BDC program.

Regards,

Anil N.

Read only

0 Likes
1,036

FORM MAP_ITEMDATA .

if WA_DATA-NEWBS = '40' OR WA_DATA-NEWBS = '50'.

perform bdc_dynpro using:

'X' 'SAPMF05A' '0300',

' ' 'BDC_CURSOR' 'RF05A-NEWKO',

' ' 'BDC_OKCODE' '/00',

' ' 'BSEG-WRBTR' WA_DATA-WRBTR,

' ' 'BSEG-MWSKZ' WA_DATA-MWSKZ,

' ' 'BKPF-XMWST' WA_DATA-XMWST,

  • ' ' 'BSEG-VALUT' 08.07.2009,

' ' 'BSEG-SGTXT' WA_DATA-SGTXT.

IF v_flag = 'X'.

perform bdc_dynpro using:

' ' 'RF05A-NEWBS' WA_ITEMDATA-NEWBS,

' ' 'RF05A-NEWKO' WA_ITEMDATA-NEWKO.

ENDIF.

perform bdc_dynpro using:

' ' 'BDC_SUBSCR' 'SAPLKACB'.

perform bdc_dynpro using:

'X' 'SAPLKACB' '0002',

  • ' ' 'BDC_CURSOR' COBL-FKBER,

' ' 'BDC_OKCODE' '=ENTE',

' ' 'COBL-KOSTL' WA_DATA-KOSTL,

' ' 'COBL-AUFNR' WA_DATA-AUFNR,

  • ' ' 'COBL-PRCTR' 'OTHERS',

' ' 'COBL-FKBER' WA_DATA-FKBER,

' ' 'BDC_SUBSCR' 'SAPLKACB' .

endif.

if WA_DATA-NEWBS = '31' .

perform bdc_dynpro using:

'X' 'SAPMF05A' '0302' ,

' ' 'BDC_CURSOR' 'BSEG-WRBTR',

' ' 'BDC_OKCODE' '=BS',

' ' 'BSEG-WRBTR' WA_DATA-WRBTR,

' ' 'BSEG-ZTERM' 'WN2D',

  • ' ' 'BSEG-ZFBDT' 02.09.2009 ,

  • ' ' 'BSEG-ZLSCH' T ,

' ' 'BSEG-SGTXT' WA_DATA-SGTXT.

IF v_flag = 'X'.

perform bdc_dynpro using:

' ' 'RF05A-NEWBS' WA_ITEMDATA-NEWBS,

' ' 'RF05A-NEWKO' WA_ITEMDATA-NEWKO.

ENDIF.

ENDIF.

if WA_DATA-NEWBS = '01'.

perform bdc_dynpro using:

'X' 'SAPMF05A' '0301',

' ' 'BDC_CURSOR' 'RF05A-NEWKO',

' ' 'BDC_OKCODE' '/00',

' ' 'BSEG-WRBTR' WA_DATA-WRBTR,

' ' 'BKPF-XMWST' WA_DATA-XMWST,

  • ' ' 'BSEG-ZTERM' WA_DATA-ZTERM,

  • BSEG-ZFBDT

' ' 'BSEG-SGTXT' WA_DATA-SGTXT.

IF v_flag = 'X'.

perform bdc_dynpro using:

' ' 'RF05A-NEWBS' WA_DATA-NEWBS,

' ' 'RF05A-NEWKO' WA_DATA-NEWKO.

ENDIF.

endif.

clear v_flag.

ENDFORM. " MAP_ITEMDATA

Read only

0 Likes
1,036

hi praja,

This is the form for populating BDC data. When u call the transaction u can call it by opening a session or call transaction statement.

for session method use BDC_OPEN, BDC_INSERT and BDC_CLOSE method else after populating all the BDC data into internal table call the transaction using Call transaction 'F-02' USING BDCDATA MODE 'E' UPDATE 'S' MESSAGES INTO IT_BDCMSG. run the prog and populate all the error msgs into an internal table.

Regards,

Anil N.

Read only

Former Member
0 Likes
1,036

go for bapi BAPI_ACC_GL_POSTING_POST

Read only

RahulKeshav
Active Contributor
0 Likes
1,036

Hi PK,

The problem might be the value you are passing to the screen 302....

I think u are uploading some file and trying to do the BDC...

If yes then use conversion FM to convert that value into internal format and then pass it to 302 screen....

this will solve your prob.

Thnx

Rahul

Read only

Former Member
0 Likes
1,036

hi,

1) please see if ur recording is in accordance with the current screen configuration of this transaction.

when screen configuration is changed the old recording does not work ,

do recording of this transaction again in shdb and compare it with the current recording of the program

if scrren nos, fields are different , go for a new recording.

2)Please carefully check and compare that if you are missing any Field while recording ,which is used while executing the transaction manually. while executing the transaction manually there are ceratin values which populate automatically also check if those values are being filled while running through batch.

thanks

Read only

Former Member
0 Likes
1,037

Hi praja,

once check the recording or rerecord. May be the screen sequence has been missing while recording. Be careful while recording.

Rgds,

gsaa..