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
738

hi all,

In BDC iam creating purchase order using Call transaction method. So iam uploading datas from flat file(header and item details).

so In the call transaction if I use 'A'(all screen mode) then i can get the purchase order number in bdcmsgcoll(MSGV2).

data itab3 like table of bdcmsgcoll.

CALL TRANSACTION 'ME21' USING ITAB2 mode 'A' UPDATE 'S' MESSAGES INTO itab3.

If i use 'N'(no screen mode) then i cannot able to get the purchase order number in bdcmsgcoll(MSGV2).

CALL TRANSACTION 'ME21' USING ITAB2 mode 'N' UPDATE 'S' MESSAGES INTO itab3.

Is there any other way to rectify how to get the purchase order number in 'N'(no screen mode)???

Moderator message: please use more descriptive subject lines for your posts.

Edited by: Thomas Zloch on Jan 13, 2011 11:50 AM

6 REPLIES 6
Read only

Former Member
0 Likes
700

Hi siva ,

when processing in mode A did you get any popups or anything which was not done by ok codes and you had to manually take an action .

Read only

0 Likes
700

hi

no i didnt do anything manually. using okcode popup only i did for all screens

Read only

Former Member
0 Likes
700

Hi,

check the sy0subrc after the BDC call..

The sy-subrc returned after the call transaction is 1001



CALL TRANSACTION 'ME21' USING ITAB2 mode 'A' UPDATE 'S'  MESSAGES INTO itab3.
if sy-subrc gt 1000.
 "try to check popup..
endif.

read the error messages with the function mod 'FORMAT_MESSAGE'. 
DATA: lv_MESSTAB(250).

CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = SY-LANGU
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = lv_messtab
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2 .
IF SY-SUBRC 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF.

Prabhudas

Read only

0 Likes
700

hi

yes i got sy-subrc returned as 1001. but its working fine in 'A' all screen mode in call transaction.

but in 'N' (no screen) mode i cant get the PO number in msgv2 in bdcmsgcoll...

Read only

0 Likes
700

If there is any sort of messages( ex: screen field not found,no batch inpput data etc ) then the mode N will fail. In mode A may be you are proceeding. In mode N what are you getting in the message tab othre than the final message.

Read only

Former Member
0 Likes
700

Hi,

I also faced similar issue few months a go.

While creating recording in SHDB check the last checkbox 'Simulate Background Mode'

with that recording create your BDC is will work.

Regards

Bikas