<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832572#M354652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I need to do the below requirement and i coudn't understand, can any body help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Join the delivery header table LIKP to delivery Line item Table LIPS and check whether any records exist for the delivery no entered on selection screen and delivery Type &amp;#145;LR&amp;#146; (returns delivery) and plant  (LIPS-WERKS) combination stored in internal table a. If the records got are greater than zero, then populate the material no (LIPS-MATNR), quantity (LIPS-LFIMG) and plant (LIPS-WEKRS) in internal Table c. Then for each line in internal table &amp;#145;c&amp;#146; go to table MARC for material and plant stored in internal table &amp;#145;c&amp;#146; and get the country of origin (MARC-HERKL) and update in internal table &amp;#145;c&amp;#146;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls provide the coding for the above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnaks in advance&lt;/P&gt;&lt;P&gt;karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Feb 2007 15:21:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-02T15:21:11Z</dc:date>
    <item>
      <title>Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832572#M354652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I need to do the below requirement and i coudn't understand, can any body help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Join the delivery header table LIKP to delivery Line item Table LIPS and check whether any records exist for the delivery no entered on selection screen and delivery Type &amp;#145;LR&amp;#146; (returns delivery) and plant  (LIPS-WERKS) combination stored in internal table a. If the records got are greater than zero, then populate the material no (LIPS-MATNR), quantity (LIPS-LFIMG) and plant (LIPS-WEKRS) in internal Table c. Then for each line in internal table &amp;#145;c&amp;#146; go to table MARC for material and plant stored in internal table &amp;#145;c&amp;#146; and get the country of origin (MARC-HERKL) and update in internal table &amp;#145;c&amp;#146;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls provide the coding for the above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnaks in advance&lt;/P&gt;&lt;P&gt;karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 15:21:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832572#M354652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T15:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832573#M354653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOin the tables LIKP LIPS with VBELN.&lt;/P&gt;&lt;P&gt;NO need 2 internal tables.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;TABLES: LIKP, LIPS, MARC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF I_A OCCURS 0,&lt;/P&gt;&lt;P&gt;VBELN LIKE LIKP-VBELN,&lt;/P&gt;&lt;P&gt;WERKS LIKE LIPS-WERKS,&lt;/P&gt;&lt;P&gt;LFIMG LIKE LIPS-LFIMG,&lt;/P&gt;&lt;P&gt;MATNR LIKE LIPS-MATNR,&lt;/P&gt;&lt;P&gt;HERKL LIKE MARC-HERKL,&lt;/P&gt;&lt;P&gt;END OF I_A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA HERKL LIKE MARC-HERKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : SO_VBELN FOR LIKP-VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT LIKP&lt;SUB&gt;VBELN LIPS&lt;/SUB&gt;WERKS LIPS&lt;SUB&gt;LFIMG LIPS&lt;/SUB&gt;MATNR INTO CORRESPONDING&lt;/P&gt;&lt;P&gt;FIELDS OF TABLE I_A FROM LIKP INNER JOIN LIPS ON LIKP&lt;SUB&gt;VBELN = LIPS&lt;/SUB&gt;VBELN&lt;/P&gt;&lt;P&gt; WHERE LIKP&lt;SUB&gt;VBELN IN SO_VBELN AND LIKP&lt;/SUB&gt;LFART = 'LR'.&lt;/P&gt;&lt;P&gt;IF NOT I_A IS INITIAL.&lt;/P&gt;&lt;P&gt;LOOP AT I_A.&lt;/P&gt;&lt;P&gt;SELECT SINGLE HERKL FROM MARC INTO HERKL WHERE MATNR = I_A-MATNR AND&lt;/P&gt;&lt;P&gt;WERKS = I_A-WERKS.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;I_A-HERKL = HERKL.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;MODIFY I_A TRANSPORTING HERKL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_A.&lt;/P&gt;&lt;P&gt;WRITE: / I_A-WERKS, I_A-MATNR, I_A-HERKL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Pls close the thread if the problem is solved and reward to all helpful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;SAB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 15:28:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832573#M354653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T15:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832574#M354654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from likp into table it_likp where vbeln in so_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_likp[] is initial.&lt;/P&gt;&lt;P&gt;select * from lips into table it_lips for all entries in it_likp &lt;/P&gt;&lt;P&gt;                                                         where vbelN = IT_LIKP-VBELN.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; select * from marc into table it_marc for all entries in it_lips &lt;/P&gt;&lt;P&gt;                                                          where matnr = it_lips-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you need loop through the it_lips and it_marc and fill the final table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 15:33:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832574#M354654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T15:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832575#M354655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;make a join select on LIKP and LIPS.&lt;/P&gt;&lt;P&gt;selection criterias as described in you requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;  select desired fields of MARC&lt;/P&gt;&lt;P&gt;  where selektion criterias match your requirements.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope that clarifies your requirements a bit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 15:33:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832575#M354655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T15:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832576#M354656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi syed&lt;/P&gt;&lt;P&gt;Thnaks for the code.&lt;/P&gt;&lt;P&gt;  This is what i have already return but one statement below i think you didn't noticed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;and plant (LIPS-WERKS) combination stored in internal table a.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have an internal table A with LIPS-WERKS in top of my program i need to include in the quiry too. how can i include this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 16:26:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832576#M354656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T16:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832577#M354657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with the below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN WERKS LFIMG MATNR &lt;/P&gt;&lt;P&gt;FROM LIPS INTO ITAB_A&lt;/P&gt;&lt;P&gt;WHERE VBELN IN S_VBELN (SELECTION SCREEN FIELD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT VBELN &lt;/P&gt;&lt;P&gt;        FROM LIKP &lt;/P&gt;&lt;P&gt;          INTO TAB_B&lt;/P&gt;&lt;P&gt;          FOR ALL ENTRIES IN ITAB_A&lt;/P&gt;&lt;P&gt;          WHERE VBELNR = ITAB_A-VBELN&lt;/P&gt;&lt;P&gt;                 AND WERKS = ITAB_A-WERKS&lt;/P&gt;&lt;P&gt;                 AND LFART = 'LR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   SELECT MATNR WERKS HERKL &lt;/P&gt;&lt;P&gt;      FROM MARC INTO TABLE ITAB_C&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN ITAB_A&lt;/P&gt;&lt;P&gt;       WHERE MATNR = ITAB_A-MATNR&lt;/P&gt;&lt;P&gt;          AND   WERKS = ITAB_A-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB_A.&lt;/P&gt;&lt;P&gt;READ TABLE ITAB_B WITH KEY VBELN = ITAB_A-VBELNR&lt;/P&gt;&lt;P&gt;                                                  WERKS = ITAB_A-WERKS&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB_C WITH KEY MATNR = ITAB_A-MATNR&lt;/P&gt;&lt;P&gt;                                                  WERKS = ITAB_A-WERKS&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;ITAB_A-HERKL = HERKL.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;MODIFY I_A TRANSPORTING HERKL.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_A.&lt;/P&gt;&lt;P&gt;WRITE: / I_A-WERKS, I_A-MATNR, I_A-HERKL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 16:42:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/1832577#M354657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T16:42:57Z</dc:date>
    </item>
  </channel>
</rss>

