Multiple E1EDP05 segment needs to be populated

Hi,
I have a requirement for inbound  ORDERS type of IDOC. My requirement is for mutiple E1EDP05 segment  how to populate in the internal table.Below is my current code...
     LOOP AT  dedidd.               
       CLEAR : lw_e1edk01,
               lw_e1edka1,
               lw_e1edp01,
               lw_e1edp05,
               lw_e1edp19.
       CASE dedidd-segnam.
         WHEN 'E1EDK01'.
           lw_e1edk01 = dedidd-sdata.
           lf_curcy = lw_e1edk01-curcy.
           MOVE lf_curcy TO lw_e1edp05_data-koein.
         WHEN 'E1EDKA1'.
           lw_e1edka1 = dedidd-sdata.
           IF lw_e1edka1-parvw = 'AG'.
             lf_partn = lw_e1edka1-partn.
           ENDIF.
         WHEN 'E1EDP01'.
           CLEAR lf_e1edp05.
           lw_e1edp01 = dedidd-sdata.
           MOVE lw_e1edp01-posex TO lw_e1edp05_data-posex.
         loop at dedidd where segnam = 'E1EDP05'.
         WHEN 'E1EDP05'.
           lf_e1edp05 = 'X'.
           lw_e1edp05 = dedidd-sdata.
           MOVE lw_e1edp05-kotxt TO lw_e1edp05_data-kotxt.
           if lw_e1edp05-kotxt is initial.
             lw_e1edp05_data-kschl = 'ZAV1'.
           else.
             lw_e1edp05_data-kschl = 'ZAV2'.
           endif.
           MOVE lw_e1edp05-menge TO lw_e1edp05_data-menge.
           MOVE lw_e1edp05-kobtr TO lw_e1edp05_data-kobtr.
         endloop.
         WHEN 'E1EDP19'.
           lw_e1edp19 = dedidd-sdata.
           IF lw_e1edp19-qualf = '002'.
             MOVE lw_e1edp19-idtnr TO lw_e1edp05_data-matnr.
             IF lf_e1edp05 = 'X'.
* Select data from A503 table to condition type ZAV1
               SELECT SINGLE knumh FROM a807 INTO  lf_knumh
                  WHERE kappl = 'V'
                  AND   kschl = 'ZAV1'
                  AND zzfunloc_htp = lf_partn
                  AND matnr = lw_e1edp19-idtnr
                  AND varcond = lw_e1edp05_data-kotxt
                  AND waerk = lf_curcy
                  AND datbi GE sy-datum
                  AND datab LE sy-datum.
               IF sy-subrc = 0.
                 MOVE lf_knumh TO lw_e1edp05_data-knumh.
                 APPEND lw_e1edp05_data TO lt_e1edp05_data.
               ELSE.
* Select data from A505 table to condition type ZAV2
                 SELECT SINGLE knumh FROM a805 INTO lf_knumh
                       WHERE kappl = 'V'
                       AND   kschl = 'ZAV2'
                       AND zzfunloc_htp = lf_partn
                       AND matnr = lw_e1edp19-idtnr
                       AND waerk = lf_curcy
                       AND datbi GE sy-datum
                       AND datab LE sy-datum.
                 IF sy-subrc = 0.
                   MOVE lf_knumh TO lw_e1edp05_data-knumh.
                   APPEND lw_e1edp05_data TO lt_e1edp05_data.
                 ENDIF.
               ENDIF.
             ENDIF.
           ENDIF.
       ENDCASE.
     ENDLOOP.

Solved by removing the extra loop & inserting the values into an internal table

Similar Messages

  • Multiple source segments need to map to target  based on conditions

    Hi All,
    I am facing a problem,
    Scenario is like this
    Source structure will be like this
    E1ADRM1 --> occurences 0...99
    E1ADRM1 --> occurences 0...99
    E1ADRM1 --> occurences 0...99
    E1ADRM1 --> occurences 0...99
    Target structure
    I9INPT00  --> occurences 1:1
    Data  comes like this
    1) E1ADRM1 --Partner_Q = AG
       E1ADRM1 --Partner_ID = 0000011223
    2) E1ADRM1 --Partner_Q = OC
       E1ADRM1 --Partner_ID = 0000011224
    3) E1ADRM1 --Partner_Q = WE
       E1ADRM1 --Partner_ID = 0000011565
    4) E1ADRM1 --Partner_Q = GE
       E1ADRM1 --Partner_ID = 0000011446
    Target structure to be mapped
    I9INPT00--<b>PHSHTO</b> with value 0000011223(If AG)
    I9INPT00--<b>PHSOTO</b> with value 0000011565 (if WE)
    the condition is like this
    If E1ADRM1--Partenr_Q = AG then PARTNER_ID has to be mapped to target
    I9INPT00 --> <b>PHSHTO</b>
    If E1ADRM1--Partenr_Q = WE then PARTNER_ID  has to be mapped to target I9INPT00 --> <b>PHSOTO</b>
    I have tried but getting only one value for the first E1EDARM1 = AG and the rest are not at all triggering
    So please can one give suggestions for this...
    Thanks and Regards,
    sridhar
    I

    HI Sridhar,
    If you wanted to generate the target node based on the below conditions, I assume that you will have maximum 4 target node generated based on the below conditions.
    1) E1ADRM1 --Partner_Q = AG
    E1ADRM1 --Partner_ID = 0000011223
    2) E1ADRM1 --Partner_Q = OC
    E1ADRM1 --Partner_ID = 0000011224
    3) E1ADRM1 --Partner_Q = WE
    E1ADRM1 --Partner_ID = 0000011565
    4) E1ADRM1 --Partner_Q = GE
    E1ADRM1 --Partner_ID = 0000011446
    What you can do is you can right click on target node and by selecting dublicate you generate the 4 target node and then you can compare the values of source and if it is AG or GE then mapp the value to target node.
    There will be four different mappings conditions for each target node.
    I think this will work.
    Thnx
    Chirag

  • Generate multiple Idoc segments

    Hi all,
    I have a Flat file to Idoc Scenario.
    I need to generate no. of multiple Idoc Segments based on the source field value.
    For Eg: if Field1 starts with 5 or 6 then E1 segment should be created 5 times,
    similarly if Field1 starts with 4 then E1 segment is created 6 times
    And as many times E1 is created that many times the corresponding other E2,E3 segments are created
    i.e E2 E3 has 1-1 relationship with E1
    Can this be done graphically ?
    Working on PI 7.0 Environment
    I would appreciate your Inputs.
    Regards,
    Varun
    Edited by: Varun Reddy on Oct 5, 2010 8:21 AM

    Im pretty sure that if you duplicate the target segment the max number of times (6) but you only map to 4 of them, only 4 will be created in the target structure. Let the Mapping/Data drive how many segments actually get created in your target structure.
    I could be wrong but Im pretty sure thats how Ive handled repeating segments before.

  • Does CISCO C3560X VLAN support multiple Network segments which are further configured with HSRP function

    Hi Cisco experts,
        My name is Kumagai and I need your expert opinions below.
    I am trying to configure one VLAN1 support multiple network segments as below.
    (this should be a very straight forward configuration and should be OK, I think ? )
     interface Vlan1
     ip address 172.30.0.0 255.255.128.0
     ip address 172.30.31.253 255.255.254.0 secondary
     ip address 172.30.61.253 255.255.254.0 secondary
     ip address 172.30.71.253 255.255.254.0 secondary
     ip address 172.30.4.253 255.255.255.0 secondary
     The only issue that is eating me is the above network segments are using HSRP too
     and I am not sure is this possible with a combination of VLAN1 supporting multiples which are
     further supported with HSRP settings in Cisco environment.
    !example of HSRP:
    interface Vlan4
     ip address 172.30.4.253 255.255.255.0
     no ip redirects
     standby 4 ip 172.30.4.254
     standby 4 priority 105
     standby 4 preempt
    <<< what will happen if I add the HSRP configuration as below into the above VLAN1 with multiple Network segment ??)
     I would like to summarize my "Combined" configurations as below but I need your expert opinions on
     whether the configuration below is workable without any problem ??
     Or it is a total flop because Cisco does not support the configuration below !!!
     interface Vlan1
     ip address 172.30.0.0 255.255.128.0
     ip address 172.30.31.253 255.255.254.0 secondary
     ip address 172.30.61.253 255.255.254.0 secondary
     ip address 172.30.71.253 255.255.254.0 secondary
     ip address 172.30.4.253 255.255.255.0  secondary
     standby 30 ip 172.30.31.254
     standby 30 priority 105
     standby 30 preempt
     standby 60 ip 172.30.61.254
     standby 60 priority 105
     standby 60 preempt
     standby 70 ip 172.30.71.254
     standby 70 priority 105
     standby 70 preempt
     standby  4 ip 172.30.4.254
     standby  4 priority 105
     standby  4 preempt
    Thanking you in advance !!!!!

    Hi,
    As far as i know we dont set the ip helper address on the radio interface. It should be on the L3 interface of corresposding VLANs i.e.
    int vlan 20
    ip helper-address 192.168.33.xxx
    int vlan 60
    ip helper-address 130.20.1.xxx
    I'm assuming that your using SVI's (int Vlan 20 and int Vlan 60) rahter than physical interfaces. Also hope you have configured switch port as trunk where this AP is connected.
    Modify the AP config as below since you are using data vlan as the native vlan
    interface Dot11Radio0.20
    encapsulation dot1Q 20 native
    interface FastEthernet0.20
    encapsulation dot1Q 20 native
    Ideally your AP fastethernet configuration should looks like below and not sure how you missed this as this comes by default when you have multiple vlans for multiple ssids.
    interface FastEthernet0.20
    encapsulation dot1Q 20 native
    no ip route-cache
    bridge-group 20
    no bridge-group 20 source-learning
    bridge-group 20 spanning-disabled
    interface FastEthernet0.60
    encapsulation dot1Q 60
    no ip route-cache
    bridge-group 60
    no bridge-group 60 source-learning
    bridge-group 60 spanning-disabled
    Hope this helps.
    Regards
    Najaf

  • Getting multiple ST segments in EDI document.

    Hi,
    I am working on EDI 850 to IDOC Scenario.
    My EDI 850 file has multiple ST Segments. how do i convert this multiple ST segments into multiple IDOCs.
    Please help me on this issue.
    Thanks,
    Seenu.

    Can you plzz explain me with processing flow.
    The entire flow is well explained in the blog by Michal.
    The IDOCS will be created and delivered in the same call and as a single message.....there wont be any 1:n transformation happening here.....the ultimate message created will be 1 only.....only the IDOC nodes will be as per your ST segments.
    Regards,
    Abhishek.

  • Which IDOC segments need to be filled for message type CRMXIF_ORDER_SAVE_M

    Hi ,
    I am working on data migration to CRM7.0 system.I am using LSMW for creating ISU Contracts using CRMXIF_ORDER_SAVE_M message type and CRMXIF_ORDER_SAVE_M01 IDOC kindly help me in what all segments needs to be filled for creating ISU contract in CRM system.
    Kindly share if there are any documents related to data migration into CRM system for IS - Utilities.I need to migrate  u201CBusiness Partnersu201D, u201DISU Contract Accountsu201D, u201DConnection Objectsu201D, u201DPODu201D & u201CContractsu201D  to CRM 7.0 .
    Also I need to migrate Customer Interaction Records, Business Activities, Service requests and other information such as u201CProspectsu201D, u201CMarketing Attributesu201D to CRM 7.0.
    Kindly help me in this as I am not able to find any thing from web.
    Regards,
    Suresh.

    Hello,
    I'm not sure you're taking the best approch.
    Usually when you need to migrate ISU contracts into an ISU-CRM integrated system, you first migrate everything you need in ISU through the VERY powerful migration workbench available (transaction code EMIGALL), and then you replicate your data to CRM via INITIAL download.
    That's definitely the strategy that will give you the best performance, and less work.
    Kind regards,
    Nicolas Busson.

  • OBIEE BI Apps data level security involving multiple PeopleSoft Segments

    Has anyone implemented OBIEE BI Apps data level security involving multiple PeopleSoft Segments and can provide some tips?
    Our PeopleSoft security grants access by 2 segment combinations:
    All Segment 3 (Department)  and any Segment 6 (Project)
    Specific Segment 6
    Specific combinations of Segment 3 and Segment 6
    In addition, there is a flag to indicate if the user also has access to payroll data. Payroll access is a subset of the general finance access.
    We've got a security init blocks running successfully for general finance and payroll access. We've created Data filters on the Segments for general finance access and GL Account for payroll access.  We designed dashboards to use Dept and Project from the Segments on the general finance dashboards and pull Dept and Project from GL Account for the payroll dashboards.
    The problem is both data filters are being applied to the general finance dashboards since the joins behind the scenes on the general finance dashboards use GL Account.
    Does anyone have a suggestion?

    Business Intelligence Applications

  • Does a single transaction, spreeds accross multiple rollback segments?

    Hi,
    Does a single transaction, spreeds accross multiple rollback segments?
    What if , there is not enough space in the allocated rollback segment?
    Thanks
    Naveen.

    With the additional note/ caveat that, assuming you're using a moderately recent version of Oracle and using automatic UNDO management, which you really, really ought to be doing, Oracle is constantly adding, removing, and expanding the rollback segments, making it all but impossible for a rollback segment to be too small unless it (along with all the other active redo segments) exceed the size of your UNDO tablespace.
    Justin

  • ROLLBACK SEGMENT NEEDS RECOVERY AND HOW TO RESOLVE IT

    제품 : ORACLE SERVER
    작성날짜 : 1995-02-06
    Subject :
    This article discusses what it means when a rollback segment needs
    recovery and how to resolve it.
    OVERVIEW
    This bulletin discusses why a rollback segment is the status of
    "needs recovery", what the status means, and how to resolve it.
    INTRODUCTION
    Rollback segments can be monitored through the data dictionary view,
    dba_rollback_segments. There is a status column that describes what state
    the rollback segment is currently in. Normal states are either online or offline.
    Occasionally, the status of "needs recovery" will appear.
    This is considered to be a corrupted rollback segment.
    When a rollback segment is in this state, bringing the rollback segment
    offline or online either through the alter rollback segment command or
    removing it from the rollback segments parameter in the init.ora usually has no effect.
    UNDERSTANDING
    A rollback segment falls into this status of needs recovery whenever
    Oracle tries to roll back an uncommitted transaction in its transaction
    table and fails.
    Here are some examples of why a transaction may need to rollback:
    1-A user may do a dml transaction and decides to issue rollback
    2-A shutdown abort occurs and the database needs to do an instance recovery
    in which case, Oracle has to roll back all uncommitted transactions.
    When a rollback of a transaction occurs, undo must be applied to the
    data block the modified row/s are in. If for whatever reason, that data
    block is unavailable, the undo cannot be applied. The result is a
    'corrupted' rollback segment with the status of needs recovery.
    What could be some reasons a datablock is unaccessible for undo?
    1-If a tablespace or a datafile is offline or missing.
    2-If the object the datablock belongs to is corrupted.
    3-If the datablock that is corrupt is actually in the rollback segment
    itself rather than the object.
    HOW TO RESOLVE IT
    1-MAKE sure that all tablespaces are online and all datafiles are
    online. This can be checked through dba_data_files under the
    status column. For tablespaces, look in dba_tablespaces.
    If that still does not resolve the problem then
    2-PUT the following in the init.ora-
    event = "10015 trace name context forever, level 10"
    Setting this event will generate a trace file that will reveal the
    necessary information about the transaction Oracle is trying to roll
    back and mostimportantly, what object Oracle is trying to apply
    the undo to.
    3-TAKE the corrupted rollback segment out of the rollback_segments parameter in the init.ora
    4-SHUTDOWN the database (if normal does not work, immediate, if that does
    not work, abort) and bring it back up.
    Note: An ora-1545 may be encountered, or other errors, that is ok.
    5-CHECK in the directory that is specified by the user_dump_dest parameter
    (in the init.ora or show parameter command) for a trace file that was
    generated at startup time.
    6-IN the trace file, there should be a message similiar to-
    error recovery tx(#,#) object #.
    TX(#,#) refers to transaction information.
    The object # is the same as the object_id in sys.dba_objects.
    7-USE the following query to find out what object Oracle is trying to
    perform recovery on.
    select owner, object_name, object_type, status
    from dba_objects where object_id = <object #>;
    8-THIS object must be dropped so the undo can be released. An export or
    relying on a backup may be necessary to restore the object after the corrupted
    rollback segment goes away.
    9-AFTER dropping the object, put the rollback segment back in the init.ora
    parameter rollback_segments, removed the event, and shutdown and startup
    the database.
    In most cases, the above steps will resolve the problematic rollback segment.
    If this still does not resolve the problem, it may be likely that the corruption is
    in the actual rollback segment.
    At this point, if the problem has not been resolved, please contact
    customer support.

    Yes we were having the performance issues when it is getting locked? in this what i want to know
    why it happens suddenly?
    or what package this piece of code is calling?
    or is there any possiblity of system will degrade the performance like sys user etc...?
    where exactly i found the root cause for further analysis?
    so that next time onwards if particular objects is locking we come to know why it happens is there any logical false or how do we eliminate this issue last time?
    coz in our environment sometimes most of lockings are from the same table?
    pls let me know where i have to concentrate for debug and how to troubloshoot and reslove this
    sorry for the inconvience.. i m expecting the answer from here. if anybody wants some more info i ll let him know.
    as of till now i got some docs i start to read this.
    Regards
    M.Murali..
    Note: will system/sys degrade the performance ?if so how ?

  • Minimum Fields that Need to be Populated for  Delivery Note

    Does anyone have a list of bare minimum fields that need to be populated when uploading a Delivery Note from another 3rd party system (e.g. a shipping system) to SAP Business One?
    Thanks.
    Kushal Dutta.

    Hi Dhruv:
    Thank you for your answer - that was helpful. Please note that I had originally posted this in SDK, and no one answered for over a week. I got an immediate reply back from you once I posted it in the Integration forum - sorry about that.
    I have a related question though.
    When I am posting the Delivery Note back to B1, I had expected B1 to generate the DocNum. However, it gives me an error if I do not populate the DocNum field. I have to put a value there, however, it appears to me that B1 is ignoring the value that I put and is generating a new DocNum. I am happy with that, however, need to know two things:
    a) Is there a specific value that I should populate the DocNum field wth before sending the XML to B1, or just any random number will do?
    b) How do I control which Sales Order the Doclivery Note gets posted against?
    Thank you.
    Kushal Dutta.

  • Fields that needs to be populated for executing BAPI_ALM_ORDER_MAINTAIN

    Hi,
    I need to execute BAPI_ALM_ORDER_MAINTAIN to create Production Orders, Components, Operations and Equivalence numbers for co-procuts components.
    Could you please help me with the fields that needs to be populated so that the BAPI can be successfully executed to get the desired result.
    Thanks in advance !!

    Hi,
    Please check this links
    http://abap.wikiprog.com/wiki/BAPI_ALM_ORDER_MAINTAIN
    Problem with BAPI_ALM_ORDER_MAINTAIN Change Activity
    Re: Use BAPI_ALM_ORDER_MAINTAIN -  code example
    Hope it helps.
    Regards
    Hiren K.Chitalia

  • Populating E1EDP05 segment of idoc type INCOIC01

    Hi guys,
    I have an issue for the AUTO LIV where the inbound idoc has this segment E1EDP05 which now has just one currency type being filled in which is causing an error while processing the idoc saying "<b>The IDOC does not contain all necessary currencies/valuations</b>". When we asked SAP they said us to <b>populate two new currency types in this segment E1EDP05 one for currency type 12 and other for currency type 31.</b>
    Guys can any one help me do this from scratch. I dont know exactly how to populate.
    Guys its a little urgent. <b><REMOVED BY MODERATOR></b>.
    Message was edited by:
            Alvaro Tejada Galindo

    Hi Sanjay,
    Following links will help you
    http://www.informatik.fh-wiesbaden.de/~werntges/lv/edi/specs_EN/SAPdoc/IDoc_d.htm
    http://www.tech-archive.net/Archive/BizTalk/microsoft.public.biztalk.general/2005-02/0144.html
    idoc
    http://www.supinfo-projects.com/fr/2005/idocs_en/4/
    Award points if useful...
    thanks
    Ravee

  • How to update condition value using e1edp05 segment during order creation

    Hi,
    I have a requirement where I need to update the item level condition value (komv-kbeter)  to the condition type (komv-kschl) from the incoming idocs (orders05).
    But  the same is configured  in such a way to populate automatically with the default condition value zero during the order creation level using VA01 at condition tab.
    I am able to populate condition values from incoming idoc using segment E1EDP05 which is good, but it was getting created as new entry with the same condition type  instead of updating the condition value to the existing condition type(which got populated from automatically from configuration) .
    So I want to restrict to one entry instead of two with same condition type. Is there any userexit/gap to restrict automatic population of condition type thru programming or to update with idoc (orders05) value rather than inserting as new row?
    My client doesn’t want to restrict the pricing automation from configuration. So I have to handle through programming level.
    Your  inputs are appreciated

    It doesn't really matter if it's a credit/debit memo, it's the same transaction anyway and pretty much the same functionality. What is your requirement exactly? Do you always have to override the price from Siebel or, let's say, some price is automatically proposed and you might or might not need to override it?
    We use a custom (Z..) condition for price override. When a material is entered in VA01, some price (condition PR00, for example) is assigned automatically. Then, let's say, a special price has been negotiated with this customer just for this purchase. So the user goes into Conditions, types in condition code Z... and types in the new price. This basically annuls the previous PR00 condition. I'm not a functional consultant and can't give you all the config details, but your SD person should be able to help.
    I'm still positive that conditions cannot be removed or changed by IDoc. One thing I would suggest for your situation: do not create ZCD2 condition initially and then just add ZCD2 condition when you receive the data from Siebel. Otherwise it seems that you would have to write a user exit or a requirement to deal with the duplicate conditions.

  • How the segment E1EDP19 is getting populated in an IDOC

    Hi All,
    We have an outbound IDOC with IDOC type INVOIC01 and message type as INVOIC.
    In this IDOC there is one segment called E1EDP19 ( with two fields QUALF and IDTNR ) which is populated with some value .
    I need to find from which table this value is coming from?
    Can you please guide through?
    Thanks in advance,
    Regards
    Sanjeet

    It is not restricted to a single table as far as I know. But, by seeing the dataelement's description for the field QUALF, it is given as IDOC object identification such as material no.,customer.
    So..It can be from MARA,KNA1,MARC,MAKT........
    Similary the same rules applies for IDTNR.
    Hope this is helpful

  • Multiple idoc segment values to field fixed length FCC

    Friends,
    I need help to resolve a mapping issue. here is the brief about the scenario.
    Scenario: IDoc to Flat file Fixed length fields
    Issue: Idocs has values in multiple segments. i need to check condition for each segment occurrence if value exists then pass value if not then pass constant (i have to pass constant so that i can get the actual column width after FCC)
    Iam using the following logic.
    If condition then value1 -> remove contexts -> split by value -> target
    My scenario works fine for the above mapping however when i try introduction a constant in "if then else" then all my contexts in the target structure messes up.
    Thanks for your help.
    Regards,
    Pavan

    Did you tried MapWithDefault before Remove Contexts? To give more perfect solution , we would like to see a sample structure.
    raj.

Maybe you are looking for