Skip to Content
author's profile photo Former Member
Former Member

How to populate data into extended IDOC

Hi all,

I have extended IDOC, I want to populate the data into newly added field. Message type is MATMAS. Can you please tell me what user exit should i use and logic if you can.

Thanks,

Shashikanth.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2005 at 09:01 AM

    exit_saplmv01_002 - include zxmgvu03

    CHECK MESSAGE_TYPE EQ 'MATMAS'.
    IF SEGMENT_NAME EQ 'E1MARAM'.
        CLEAR IDOC_DATA.
        IDOC_DATA-SEGNAM = 'Z1MARAM'.
        IDOC_DATA-SDATA  = 'XXXXX'.
        APPEND IDOC_DATA.
        IDOC_CIMTYPE = 'ZMATMAS'.
      ENDIF.
    ENDIF.

    Here at Child of segment E1MARAM is created - Z1MARAM and the segment is populated with XXXX

    Message was edited by: Kim Ternstrøm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2005 at 09:16 AM

    Hi Shahsi,

    If you are on 46C or above you can use BADI BADI_MATMAS_ALE_CR ( method Change Matmas ).

    In this method you have the full EDIDD data which you can change like-

    <b>DATA WA TYPE EDIDD.

    DATA SEG TYPE <YOUR_CUSTOM-SEGNAM>.

    LOOP AT T_IDOC_DATA INTO WA WHERE SEGNAM EQ <YOUR_CUSTOM-SEGNAM>.

    MOVE WA-SDATA TO SEG.

    SEG-<YOUR_FILED> = 'XXXX'.

    MOVE SEg TO WA.

    MODIFY T_IDOC_DATA FROM WA.

    ENDLOOP.</b>

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.