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

Do not create line item segment on the target side if quantity is 0

Hello All

I am working on SHPORD message type which is IDOC to File scenario. There is a line item segment on Source side E1EDL24 mapped to line item segment on the target side ORDERDETAIL. My requirement is ORDERDETAIL segment should not be created if the field LFIMG under the segment E1EDL24 is equal to ZERO. Could somebody tell me how to achieve this.

Thanks

Naga

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2008 at 07:29 PM

    Use the following logic

    [{(LFIMG equalS 0)NOT}createIf]--->ReceiverNode

    Thanx

    Aamir

    Edited by: Aamir Suhail on Oct 10, 2008 2:34 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2008 at 08:55 PM

    Aamir

    How do I do that, do I have to write an UDF function. Could you please explain in detail.

    Thanks

    Naga

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hey

      There is no UDF involved in this,all are standard functions.

      First use the equalS standard function to compare LFIMG and 0,feed the output of this to NOT function,then feed its output to createIf function and then map it to the receiver field.

      Thanx

      Aamir

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2008 at 11:01 PM

    Hi Naga

    You can do it with standard Mapping functions

    
    
    E1EDL24
         LFIMG -> Equals (0 or ZERO) -> Not -> CreteIf - Receiver Node
    
    it is interpreted like this
    
    Target = CreateIf(Not(LFIMG =0)) 
    
    

    if LFIMG = 0 return true then Not make it false and node is not created

    if LFIMG = 0 return false then Not make if true and node is created

    Thanks

    Gaurav

    Edited by: Gaurav Bhargava on Oct 11, 2008 4:32 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2008 at 11:17 PM

    Gaurav

    It did not work. In my mapping LFIMG is mapped to Quantity field which is under OrderDetail. So if LFIMG is 0, then I should not create Order Details at all.

    For example, if I have two line items in a Delivery and if E1EDL24-LFIMG for both the line items is 10 and 20 then two ORDERDETAILS nodes have to be created.

    If one of the line items quantity is equal to 0 then only one ORDERDETAIL node has to be created.

    Thanks

    Naga

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2008 at 11:46 PM

    Thanks Aamir and Gaurav, I got the required output.

    Naga

    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.