IDOC_DATA_INSERT

Hi all,
I am trying to insert data to a new segment in COND_A idoc (outbound idoc) .To fill this segment , i need data from E1konh and Ekonp , the user exits are carrying only E1komg data.
I found a badi IDOC_DATA_INSERT where i would get the required data.
But when i fill the parameters and send it , an idoc is created but i dont find my segment in the idoc.
Can you give some sample code or tell me a way to fill this.
Thanks in advance.
Regards,
Vijay

Hi all,
I'm also having some issues adding segments at a specific level. Say that I have 4 main nodes in the IDoc:
HEADER
     CHILD
HEADER
     CHILD
HEADER
     CHILD
HEADER
     CHILD
and I want to add a child node to every one of the HEADER, in front of the other child nodes, resulting in:
HEADER
     ADDEDCHILD
     CHILD
etc.
What values should the new_entries in this BADI get for these fields:
SEGNUM   
COUNTER
Also, what exactly does the protocol do in this BADI? Is there anyone who can help with these questions?

Similar Messages

  • Any BADI returning the 'IDOC Status'  during IDOC generation.

    Hello All,
    I need a BADI which is being called during any IDOC generation and which returns the 'IDOC Status' i.e. Pass/Fail etc.
    So far I am able to find BADIs like 'IDOC_DATA_MAPPER' or ''IDOC_DATA_INSERT'' but such BADIs only return the IDOC document number.. they do not return any information on IDOC Status (the field Status field remains blank).
    Can any one suggest some solution on this please.
    Regards
    Vikas Gupta

    Hi Erik,
    Thanks for your reply, though i was able to get the status from BADI IDOC_DATA_MAPPER itself (earlier there were some config issues...which were creating some problems) but thanks for letting me know about table EDIDS, it helped at places.
    Regards
    Vikas Gupta

  • How to include a new segment in FIDCCP02 idoc (OUTBOUND)

    Hi,
    I would like to know in which EXIT or BADI I should append my new segment to the idoc data.  I have created the new segment to add new Z fields that I added before on the BSEG, and I have created the enhancement of the idoc and put the new segment in the correct place.
    Best Regards

    Adrian,
    Isn't the BADI IDOC_DATA_INSERT the correct answer?
    Regards,
    Ashvin

  • Error Handling for IDOC_OUTPUT_SHPMNT

    Hi Experts,
                    According to requirement, I have to error out outbound IDoc if it fails for couple of  required checks & change status message of IDoc with own error message. I did same for inbound IDoc but for outbound, in exit_saplv56k_002, IDOC_STATUS is not available. I checked in IDOC_OUTPUT_SHIPMT function module & there isn't any exits in which I can modify status. Can any one guide me how to full fill this requirement.
    Points will be rewarded for all helpful answers.
    Thanks,

    Using BADI IDOC_DATA_INSERT I can insert a new error status code to the idoc so it will stop after the idoc is created.
    User will not be able to reprocess the idoc but can issue a new output after correcting data the shipment
    Hope this will help.
    neo

  • User Exit for Aleaud Idoc

    Hi everybody!!!
    Does anybody knows if exist any user-exit or badi for aleaud idoc???
    We receive an Idoc from PI and we sent an Aleaud Idoc to Pi as Ack and we need populatel some fields.
    Thanks a lot

    try an implementation of BADI   IDOC_DATA_INSERT
    we have successfully added an ALEAUD extension and populated fields within the extended segment the IDoc then gets sent to PI, however we have not managed to get PI to see those extended fields yet.
    Colin

  • How to obtain the IDOC number after creation

    Hello everyone,
    for our master data distribution via report RHALEINI (triggered via a custom report), we have some additional code in BAdI HRALE00OUTBOUND_IDOC, method IDOC_DATA_FOR_RECEIVER_MODIFY.
    Everything is working fine so far. Now I need to know the Idoc number after it was created to store it in a customer table together with some additional data. Since the Idoc was not yet created when we're in the method mentioned above, I have to put my coding somewhere else.
    Any that's exactly my question: Were could I put my coding? It needs to be executed after MASTER_DATA_DISTRIBUTE since this function creates the idoc in the database.
    I though about the following:
    - Since RHALEINI is called by a custom report, I might be able to read the idoc number from memory id COMM_HRMD_A (see RHALEINI, line 418).
    - Maybe BAdI IDOC_DATA_INSERT could be used for this purpose?
    What would be your approach for this?
    Thank you in advance.

    Hello Markus,
    EXPORT comm_control TO MEMORY ID 'COMM_HRMD_A'.
    This is a nice observation!
    Since RHALEINI is called by a custom report, I might be able to read the idoc number from memory id COMM_HRMD_A
    Are you SUBMIT'ting the report RHALEINI in the custom program? If yes, you can access the memory COMM_HRMD_A in your program. To verify this you can check in debug mode if the memory id is populated.
    I've checked the report RHALEINI & the internal table comm_control should contain the idoc number!
    Maybe BAdI IDOC_DATA_INSERT could be used for this purpose
    Only if the previous approach doesn't work out. Remember [K.I.S.S|http://en.wikipedia.org/wiki/KISS_principle]
    BR,
    Suhas

  • From Which FI Transaction Trigger outbond IDOC FIDCCP02;

    Hi Experts,
        Can you please let me know From Which FI Transaction Trigger outbond IDOC FIDCCP02;Is there any Exit Or BADI AVAILABLE TO DO THIS?
    Also how to fill Custom segments in this.
    Thanks.
    Debi.

    Hi Debi,
    You can use BADI IDOC_DATA_INSERT to populate your custom segments.
    Also there are user exits available to use in FM
    FI_IDOC_CREATE_FIDCC1 or FI_IDOC_CREATE_FIDCC2.
    Check EXIT_SAPLF050_*
    Regards,
    Ferry Lianto

Maybe you are looking for