Ask the Expert

Generating IDocs from VB

I am new to IDoc formatting and working in VB. Now I want to generate IDocs from VB. How can I do that? What are all the things I have to look for? I want to pass some invoice amounts and some more values to SAP.

    Requires Free Membership to View

I presume that you know how an IDoc is constructed. It is a simply ASCII document. For learning and development, simply choose one convenient IDoc from your existing R/3 system. The IDoc is stored in tables EDIDC (header) and EDID4 (data). Export such a document to a file.

(data: datatab type char1024 with header line.
Select * from edidc into table datatab where docnum eq docnum.
Select * from edid4 appending table datatab where docnum eq docnum.
Call function 'GUI_DOWNLOAD' …)

To inject the data to R/3 you have to either write a file with the correct format and import the document from file using IDOC_INBOUND_FROM_FILE (Report: RSEINB00), or make an RFC call from VB to function IDOC_INBOUND_ASYNCHRONOUS. Details on RFC programming from VB are described on http://www.logosworld.com in the section MYSAP/NETWEAVER.

This was first published in April 2005

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.