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

Create Idoc from Custom BAPI

Former Member
0 Likes
323

Hi Friends,

I am having trouble with BDBG and generating an idoc from a custom BAPI. Our requirement is to receive a file from an XI system, and to run the file into Core R/3 via an idoc (as an TRFC will result in a synchronous update and XI will wait for it to complete, whereas my XI consultant wants XI to forget about the file after the idoc is sent, and we wish to use IDoc error handling if there are any problems).

Consequently, I have 2 questions:

1) In my RFC which I have converted to a BAPI, should I cater for the inbound file as a table type, or do I need to define the file line as import parameters;

2) If I define the file structure as the import parameter, do I need to specify each field of the line as a separate import parameter


ZRCTI_NO    type   ZFRCTI_INB_STRUC-RCTI
ZCUSTOMER type ZFRCTI_INB_STRUC-KUNNR
ZDELIVERY  type ZFRCTI_INB_STRUC-VBELN

or can I use a line structure for the import


ZBAPI_INB   TYPE  ZFRCTI_INB_STRUC

Presently I have the line structure as a single import parameter, but I'm getting the pop-up message:

As the object Zxxxxx has no key fields, no links to Idocs can be written...

If I need to separate out each field as a seperate import parameter in the Function Module, how do I go about regenerating the BAPI?

So it's really 3 questions, but nonetheless, points will be rewarded for helpful responses.

Cheers,

Steve

1 REPLY 1
Read only

Former Member
0 Likes
279

Reposted on ABAP General because no-one responded on Data Transfer.