IDOC_DATA_MAPPER

Hi at all,
who can help me to manipulate idocs with the BADI: IDOC_DATA_MAPPER or who knows an useful doc.
I´ve tried the following code to mod the company code. But nothing happens.
DATA: _data TYPE edid4,
        wa_maptab TYPE IDOC_CHANG.
  CHECK sy-mandt EQ '508'.
  LOOP AT data INTO _data.
    CASE _data-segnam.
      WHEN 'E1BPACHE06' OR 'E1BPACGL06'.
        CLEAR wa_maptab.
        wa_maptab-segnum = _data-segnum.
        wa_maptab-feldname = 'COMP_CODE'.
        wa_maptab-value    = '0001'.
        wa_maptab-SAVE_TYPE = 'X'.
        APPEND wa_maptab TO mapping_tab.
        CLEAR wa_maptab.
        wa_maptab-segnum = _data-segnum.
        wa_maptab-feldname = 'TAX_COMP_CODE'.
        wa_maptab-value    = '0001'.
        wa_maptab-SAVE_TYPE = 'X'.
        APPEND wa_maptab TO mapping_tab.
        MOVE 'X'  TO have_to_change.
    ENDCASE.
  ENDLOOP.
best regards
Thorsten

Hi ,
is it getting triggered ?
Just have a look at code in include LEDI1F09  routine call_badi , you will get some  idea
Edited by: Keshav.T on Apr 6, 2010 9:03 PM

Similar Messages

  • Badi IDOC_DATA_MAPPER

    Hi everybody.
    Im trying to manipulate data of idocs in a implementation of IDOC_DATA_MAPPER: I want to change a field but I can´t get it.
    Does anyone knows how this badi works to can change the data????
    Thanks a lot.
    Regards

    Hello Christian,
    You must be an expert in IDOCs by now, did you ever find out if this BAdI is of any use??
    Regards,
    Simon Patrick Alexander Kerr

  • BADI to Change control record from idoc

    I’m trying to use the BADI IDOC_CREATION_CHECK to change the control record from the idoc but im not able to do it because the parameter IDOC_CONTROL is an importing parameter not a changing parameter, I’ve tried to use the BADI IDOC_DATA_MAPPER but I this case I’m just able to change the data record, should I use another BADI?
    Regards
    Luis Constantino.

    hi.
    have you tried ABI_IDOC_PROC_MODIF?
    i did not read much thru the documentation...
    i hope this helps.

  • Need to change the segment data in Inbound ORDERS05 IDOC

    Hi:
    I need to change sales area coming in E1EDK14 segment. I need to determine SAP sales area stored in TVARV table and pass it to the E1EDK14 segment.
    I am using exit EXIT_SAPLVEDA_002. In this I am looping DIDOC_DATA and checking if segment is E1EDK14 and then writing my logic and modifying the DIDOC_DATA. I am also modfying DXBDCDATA. However the fields are properly getting populated on screen but  when I went WE05 to check the IDOC the changed fields are not getting reflected in IDOC.
    Please let me know where else I have to change in order to show it in IDOC.
    Thanks.

    Toni,
    I atlast tried IDOC_DATA_MAPPER BADI and it is working fine for me.
    Appreciate your help.
    The following is the sample code I wrote inside the BADI.
    LOOP at data into wa-data.
       CASE wa_data-segnam.
           when 'E1EDP01'.
               wa_mapp-segnum    = wa_data-segnum.
              wa_mapp-feldname   = MATNR.
              wa_mapp-value         = '000000000000115123'.
              wa_mapp-save_type = c_x.
              APPEND wa_mapp TO mapping_tab.
            MOVE 'X' TO have_to_change.   "IDOC Data have to be changed with newly determined values
            IF protocol-stamid IS INITIAL.       "Populate with atleast one value
              protocol-stamid = 'ZMM'.
            ENDIF.
            IF protocol-stamno IS INITIAL.
              protocol-stamno = '001'.
            ENDIF.
       ENDCASE.
    ENDLOOP.
    Thanks.

  • 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

  • Need to reduce idoc for PO

    Hi all,
    we have a requirement to send PO details when new po is crated in SAP,
    but we need to send only 13 fields from PO , so how to reduce the fields and how map the fields,
    the below are the fields needs to send to legacy system.
    EBELN
    WERKS
    LGORT
    AEDAT
    BSART
    EBELP
    MATNR
    MENGE
    MEINS
    BANFN
    EINDT
    MENGE
    REVNO
    ERDAT
    which idoc needs to use , there are 3 idocs are available in SAP( PORDCR04, IMPINV01, ORDERS05)
    we are using ECC 6.0
    Regards,
    Suresh

    HI,
    there are a lot of ways.
    IF you are using ORDERS05 (ORDERS).
    Implement Exit "EXIT_SAPLEINM_002" and remove all unanted value in the Segments.
    Note: Each Segment is used by that exit.
    another way.
    Wait if the ORDERS is complete.
    Implement BADI "IDOC_DATA_MAPPER" and use Method "PROCESS" to get rid of all unwanted data.
    Note: this badi is called after IDOC_OUTPUT_ORDERS.
    Note: take care of using this Badi cause every created IDoc is running through that function ? You have to restrict for each IDoc Type and maybe Partner.
    example.
    Case CONTROL-IDOCTP or RCVPRN or ....
    when 'ORDERS05' ...
    endcase.
    Regards,
    Gordon

  • Encrypt SSN in idoc for infotype 0002

    I have to encrypt a field SSN for IT 0002 in idoc.
    after transporting i should have ssn in encryptred form.
    Is there any function module to encrypt desired field ?
    Thanks in advance.

    Encryption at database level is implemented using the BAdI IDOC_DATA_MAPPER and the enhancement spot IDOC_DATA_CRYPT.
    If it only needs to be encrypted for display check transaction WECRYPTDISPLAY.

  • IDOC_INPUT_GLMAST - GLMAST

    Hello All,
    For Message typ GLMAST, for inbound delivery i use the standard Function Module IDOC_INPUT_GLMAST.
    I need to delete few segements and i dont see an EXIST which will help me do so.
    Please lte me know your suggestions on this.
    1. I cannot delete at OUTBOUND level, it is comign from other system.
    2. I tried with BADI IDOC_DATA_MAPPER, but it is only to change the field content than deletion.
    Any thoughts are appreciated.
    Regds,
    Manohar

    Hello Samir,
    Thanks for your time on this.
    GLMAST01 does not facilitate any chages to IDOC.
    EXIT_SAPLKS04_001
    EXIT_SAPLKS04_002
    Both dont meet my req.
    I will do a copy of the FM with new process Code as last option, meanwhile still hoping to find a better solution.
    Rgds,
    Manohar

  • ALE IDoc Conversion Rule or BADI

    Hi,
    I'm new to ALE IDoc. I have a requirement to hide some sensitive data field for the HR information when outbound the Idoc.
    Example, I need to outbound the IT8 Basic Pay with payscale area etc but not with the basic pay amount. I can convert the basic pay amount to zero when the idoc is being created.
    I've searched through some information and found out that there are several ways to achieve it. However, I'm not sure which one is a better way.
    Is it using the Conversion Rule (BD62) or using Badi or Idoc Reduction method is better?
    Kindly give me some hints as I'm very confuse of which one is the better solution.
    Many thanks in advance.

    No user exit is needed for conversion rule.
    However, you should remember that conversion rules are applied segment fields for a particular message type. So wherever the IDoc message type is used the rule will be applied. If you want to associate the rule for any other condition in addition to message type better to go with a BADI
    These are steps to create and apply a conversion rule to a message type:
    1. Transaction BD62 - Create conversion rule and assign it to a IDoc segment
    2. Transaction BD79 - Define the conversion rule by selecting your field and clicking display button. Once inside you can use various options like set constant to map 0 to the basic pay
    3. Finally assign the conversion rule to your message type using BD55
    As for BADIs, IDOC_DATA_MAPPER is also suited for your requirement, the method PROCESS, allows you to manipulate your IDoc fields whichever way you want. You get the control record, data records, using which you can restrict your manipulation to specific message type or other conditions
    To above post, BADI IDOC_CREATION_CHECK should not be used for mappings/conversions as its specific purpose is to stop creation of an IDoc under required conditions

  • IDOC Encryption in the transferring

    Hi Buddies,
    I use IDOC->XI->IDOC to transfer the sales order through XI. There are some sensitive information in the SO IDOC, so I am wondering there is any way to encrypt the IDOC during the transferring.
    Appreciate any reply. Thanks.
    B'rgdz. Bu Ju

    Hi,
    for display encryption you can look at below link
    https://cw.sdn.sap.com/cw/docs/DOC-23361
    not sure how values will be displayed in PI after transfer.
    Encryption at database level is implemented using the BAdI IDOC_DATA_MAPPER and the enhancement spot IDOC_DATA_CRYPT.
    If it only needs to be encrypted for display check transaction WECRYPTDISPLAY.
    Regards,
    Suresh

  • Need to reduce details for using a browser game

    can I somehow adjust the flash player, so that the details of the browser game are reduced on my screen? All I found is a check box where I can choose the hardware acceleration (what was not useful)
    I am using flash player 10, firefox 3.5 and XP
    thank you for any hint!

    HI,
    there are a lot of ways.
    IF you are using ORDERS05 (ORDERS).
    Implement Exit "EXIT_SAPLEINM_002" and remove all unanted value in the Segments.
    Note: Each Segment is used by that exit.
    another way.
    Wait if the ORDERS is complete.
    Implement BADI "IDOC_DATA_MAPPER" and use Method "PROCESS" to get rid of all unwanted data.
    Note: this badi is called after IDOC_OUTPUT_ORDERS.
    Note: take care of using this Badi cause every created IDoc is running through that function ? You have to restrict for each IDoc Type and maybe Partner.
    example.
    Case CONTROL-IDOCTP or RCVPRN or ....
    when 'ORDERS05' ...
    endcase.
    Regards,
    Gordon

  • Change the principal EAN in SAP PRICAT Inbound

    I have the following problem, I'm working with SAP PRICAT inboud and I want to indicate a new EAN material.
    The material has its principal EAN associated with the unit of measure ST (unit) and I want to add an additional EAN this unit of measure ST and EAN latter is the principal.
    Greetings and Thanks

    Toni,
    I atlast tried IDOC_DATA_MAPPER BADI and it is working fine for me.
    Appreciate your help.
    The following is the sample code I wrote inside the BADI.
    LOOP at data into wa-data.
       CASE wa_data-segnam.
           when 'E1EDP01'.
               wa_mapp-segnum    = wa_data-segnum.
              wa_mapp-feldname   = MATNR.
              wa_mapp-value         = '000000000000115123'.
              wa_mapp-save_type = c_x.
              APPEND wa_mapp TO mapping_tab.
            MOVE 'X' TO have_to_change.   "IDOC Data have to be changed with newly determined values
            IF protocol-stamid IS INITIAL.       "Populate with atleast one value
              protocol-stamid = 'ZMM'.
            ENDIF.
            IF protocol-stamno IS INITIAL.
              protocol-stamno = '001'.
            ENDIF.
       ENDCASE.
    ENDLOOP.
    Thanks.

Maybe you are looking for

  • Dual screen with 2 lcd monitors?

    Hi I think i will buy myself a Macbook Pro, but i like to work on two lcd monitors(Not including the mac) but can i do this and does Parralels and Bootcamp support this settings? because i have a program on work that only support windows. Thank you

  • Keyboard upgrade for iBooks????

    I have a G4 iBook and want to upgrade to a powerbook backlite keyboard or a smoke grey or black keyboard (for the TI powerbooks) is this possible, is it just a simple swap? ant info would be good... Thanks

  • How to open/import an swf for editing

    I have had a coder create a presentation for my site, he designed it with Flash 8, and it has some minor text/spelling mistakes that I would like to repair. I have installed Suite 8, and have downloaded the files from my server, but can't figure out

  • How to append data  runtime in Table in MIDlet

    Hi Friends, i am having 2 queries.. 1st:: How can i append data runtime in table in MIDlet ( like web )which are coming from Database. 2: requirement is that 1st row of table should for headings like StartDate,EndDate,Resources and Status. From the 2

  • What is the concept of load-balancing

    Hi All, can any one explain me the concept of load-balancing Thanks.