‎2007 Mar 13 2:27 AM
Hi All
How can we process BDC seshen without going to sm35 from the program itself.
thanks
basheer
‎2007 Mar 13 4:46 AM
Hi Mohammad,
You have two options.
1. Use Call transaction method.If you have selected mode A(All), after execution you will go to the screens directly that you have selected in the program and you can process your session.
2.Use SAP program RSBDCSUB.This will be used with the session method.Session will be created and this SAP program will process your session in background.You have to Submit this SAP program in your main program with the required selection screen variant.
Regards,
Mukesh Kumar
‎2007 Mar 13 2:32 AM
‎2007 Mar 13 2:35 AM
Use the program RSBDCSUB to process the BDC session in your program at run time.
‎2007 Mar 13 2:35 AM
‎2007 Mar 13 2:40 AM
Hi Basheer,
Please try the following subroutine code after BDC field inserted:
*----------------------------------------------------------------------*
* Start new transaction according to parameters *
*----------------------------------------------------------------------*
FORM BDC_TRANSACTION USING TCODE.
DATA: L_MSTRING(480).
DATA: L_SUBRC LIKE SY-SUBRC.
* MODE - Processing Mode
* A Display all screens
* E Display errors
* N Background processing
* P Background processing; debugging possible
* UPDATE - Updata mode
* L Local
* S Synchronous
* A Asynchronous
REFRESH MESSTAB.
CALL TRANSACTION TCODE USING BDCDATA
MODE 'A' "CTUMODE
UPDATE 'L'
MESSAGES INTO MESSTAB.
L_SUBRC = SY-SUBRC.
*SMALL LOG
WRITE: / 'CALL_TRANSACTION',
TCODE,
'returncode:'(I05),
L_SUBRC,
'RECORD:',
SY-INDEX.
LOOP AT MESSTAB.
SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
L_MSTRING = T100-TEXT.
IF L_MSTRING CS '&1'.
REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ELSE.
REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).
ELSE.
WRITE: / MESSTAB.
ENDIF.
ENDLOOP.
REFRESH BDCDATA.
ENDFORM. "BDC_TRANSACTION
BR,
Neil
‎2007 Mar 13 4:23 AM
‎2007 Mar 13 4:41 AM
Hi
Use this syntax
SUBMIT ZRMB_MM_INV_PO1(your prg name) AND RETURN
WITH P_VBELN = WA_INV-VBELN (parameters).
r
u can run rsbdcsub program as somebody mentioned earlier.
Lemme know if it worked
Cheers
‎2007 Mar 13 4:46 AM
Hi Mohammad,
You have two options.
1. Use Call transaction method.If you have selected mode A(All), after execution you will go to the screens directly that you have selected in the program and you can process your session.
2.Use SAP program RSBDCSUB.This will be used with the session method.Session will be created and this SAP program will process your session in background.You have to Submit this SAP program in your main program with the required selection screen variant.
Regards,
Mukesh Kumar