How to get Sales Order No on
Status Bar in BDC
You can get the Sale Order Number from Table BDCMSGCOLL
after you complete BDC all message will contain in the structure Table
LT_MSG, loop LT_MSG and let see what SO you will get in the table
DATA : LT_MSG TYPE TABLE OF BDCMSGCOLL.
PERFORM BDC_TRANSACTION TABLES LT_MSG
USING
'VA01'
CTU
MODE
UPDATE.
FORM BDC_TRANSACTION TABLES P_MESSTAB
USING P_TCODE
P_CTU
P_MODE
P_UPDATE.
DATA: L_SUBRC LIKE SY-SUBRC.
IF P_CTU <> 'X'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = P_TCODE
TABLES
DYNPROTAB = BDCDATA
EXCEPTIONS
OTHERS = 1.
ELSE.
CALL TRANSACTION P_TCODE USING BDCDATA
MODE P_MODE
UPDATE P_UPDATE
MESSAGES INTO P_MESSTAB.
ENDIF.
L_SUBRC = SY-SUBRC.
REFRESH BDCDATA.
SY-SUBRC = L_SUBRC.
ENDFORM.
Tips by : Pim
Fast Links:
BDC to Upload Schedule Agreement
Schedule
Agreement Data Uploading
Get help for your ABAP problems
Do you have
a ABAP Question?
SAP Books
SAP Certification,
Interview Questions, Functional, Basis Administration and ABAP Programming
Reference Books
BDC Tips and Tricks
BDC Programming Tips
ABAP Tips
ABAP Forum for Discussion
and Samples Program Codes for Abapers
Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
All product names are trademarks of their respective
companies. The site www.erpgreat.com is in no way affiliated with
SAP AG.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
The content on this site may not be reproduced
or redistributed without the express written permission of
www.erpgreat.com or the content authors.
|