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

calling RSBDCSUB

Former Member
0 Likes
1,612

HI all,

i am submitting my session to RSBDCSUB program.my requirement is to display the successfully processed records in the report. when i submit the program ,if i go to SM 35 i can see my session is processed or not,but how can i know in the program my session is successfully processed or not and how to get the successfull records,

is submit command returns sy-subrc or anyother way to find out whether my sessaion is successfully processed or not.

Thanks and regards,

Gopal

HI all,

i am submitting my session to RSBDCSUB program.my requirement is to display the successfully processed records in the report. when i submit the program ,if i go to SM 35 i can see my session is processed or not,but how can i know in the program my session is successfully processed or not and how to get the successfull records,

is submit command returns sy-subrc or anyother way to find out whether my sessaion is successfully processed or not.

Thanks and regards,

Gopal

7 REPLIES 7
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,323

To be aware of success read table APQI field QSTATE. (E errored, F finished) or use FM [BDC_PROTOCOL_SELECT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=bdc_protocol_select&adv=false&sortby=cm_rnd_rankvalue]

Remember that the BDC is not at end when the SUBMIT RSDBCSUB returns.(status R running)

To get the log, look at report[ RSBDCLOG|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=+rsbdclog&cat=sdn_all].

Regards

Read only

0 Likes
1,323

Thanks Raymond,

But it is giving the staus as R for successfull processed sessions also(I mean first errored and then processed again successfully ). one more thing is RSBDCSUB is processing all the sessions that are with same name.but i want to process only recent session. is it possible.

RSBDCLOG is not available in my system, and can u tell me how can i find out the successfully processed records.

Gopal

Read only

0 Likes
1,323

What is your R3 version, do you use old or new protocol (system parameter [bdc/new_protocol|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=bdc%2fnew_protocol&cat=sdn_all])

(You may look at to view RSDBCLOG source)

For QSTATE value (from SM35 program texts)

' '. new/neu

'F' finished/verarbeitet

'E' error/fehlerhaft

'R' running/in Bearbeitung

'C' creating/in Erstellung

'S' in background/im Hintergrund

Regards

Read only

Former Member
0 Likes
1,323

Hi,

You can submit the background job RSBDCSUB to start a session in background processing. If several sessions have the same name, RSBDCSUB starts them all.

Itu2019s possible to coordinate the generation and execution of a session in the background processing system.

regards

swamy

Read only

Former Member
0 Likes
1,323

Hi,

Use this program RSBDC_PROTOCOL for SM35 log.

Read only

shadow
Participant
0 Likes
1,323

Hi ,

check dis program may be use full for u.

REPORT ZBDC_CT .

TABLES:LFA1.

DATA:BEGIN OF ITAB OCCURS 0,

LIFNR TYPE LIFNR,

NAME1 TYPE LFA1-NAME1,

ORT01 TYPE LFA1-ORT01,

LAND1 TYPE LFA1-LAND1,

END OF ITAB.

DATA:JTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

DATA:KTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

DATA:LTAB LIKE ITAB OCCURS 0 WITH HEADER LINE.

DATA:MTAB LIKE ITAB OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'E:/HYE/HI.TXT'

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = ITAB.

LOOP AT ITAB.

REFRESH JTAB.

*PERFORM SUB USING 'ZVIF' '0100'.

PERFORM SUB USING 'ZBDC_YVTRANS' '100'.

PERFORM SUB1 USING:'LFA1-LIFNR' ITAB-LIFNR,

'LFA1-NAME1' ITAB-NAME1,

'LFA1-ORT01' ITAB-ORT01,

'LFA1-LAND1' ITAB-LAND1.

PERFORM SUB1 USING 'BDC_OKCODE' 'INSERT'.

*PERFORM SUB USING 'ZVIF' '0100'.

PERFORM SUB USING 'ZBDC_YVTRANS' '100'.

PERFORM SUB1 USING 'BDC_OKCODE' 'EXIT'.

  • CALL TRANSACTION 'ZVIF' USING JTAB MODE 'A' MESSAGES INTO KTAB.

CALL TRANSACTION 'YVTRANS' USING JTAB MODE 'A' MESSAGES INTO KTAB.

LOOP AT KTAB.

IF KTAB-MSGTYP = 'I' OR KTAB-MSGNR = '000'.

MOVE-CORRESPONDING ITAB TO LTAB.

APPEND LTAB.

ELSEIF KTAB-MSGTYP = 'E' OR KTAB-MSGNR = '001'.

MOVE-CORRESPONDING ITAB TO MTAB.

APPEND MTAB.

ENDIF.

ENDLOOP.

REFRESH KTAB.

ENDLOOP.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'E:/HYE/SUS.TXT'

FILETYPE = 'ASC'

WRITE_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = LTAB.

WRITE:/ 'SUCESSFULL RECORDS IN E:/HYE/SUS.TXT FILE'.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'E:/HYE/ERROR.TXT'

FILETYPE = 'ASC'

WRITE_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = MTAB.

WRITE:/ 'ERROR RECORDS IN E:/HYE/ERROR.TXT FILE'.

FORM SUB USING A B.

CLEAR JTAB.

JTAB-PROGRAM = A.

JTAB-DYNPRO = B.

JTAB-DYNBEGIN = 'X'.

APPEND JTAB.

ENDFORM.

FORM SUB1 USING C D.

CLEAR JTAB.

JTAB-FNAM = C.

JTAB-FVAL = D.

APPEND JTAB.

ENDFORM.

Regard's

SHAIK.

Read only

Former Member
0 Likes
1,323

problem solved