<?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 transfer the data from segment to internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839682#M665053</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with CREMAS04 idoc.... I wrote the logic to capture the data into one internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO my internal table(idoc_data) type is EDIDD... in EDIDD there is one field called SDATA, which contains the data for all the segments of CREMAS04 like &lt;/P&gt;&lt;P&gt;E1LFA1M, E1ADRMAS, E1BPAD1VL....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my requirement is to get the data for the specific segment into seperate internal tables like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if idoc_data-segnam = E1ADRMAS&lt;/P&gt;&lt;P&gt;then i have to move the data from SDATA into one internal table for that specific segement data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did like  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at idoc_data.&lt;/P&gt;&lt;P&gt;           if idoc_data-segnam = c_E1BPAD1VL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           lw_E1BPAD1VL = idoc_data-SDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it is giving me error like I can't convert idoc_data-sdata to lw_e1bpad1vl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone guide me how to do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its bit urgent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your aniticipation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nitesha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2007 18:15:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-26T18:15:39Z</dc:date>
    <item>
      <title>transfer the data from segment to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839682#M665053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with CREMAS04 idoc.... I wrote the logic to capture the data into one internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO my internal table(idoc_data) type is EDIDD... in EDIDD there is one field called SDATA, which contains the data for all the segments of CREMAS04 like &lt;/P&gt;&lt;P&gt;E1LFA1M, E1ADRMAS, E1BPAD1VL....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my requirement is to get the data for the specific segment into seperate internal tables like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if idoc_data-segnam = E1ADRMAS&lt;/P&gt;&lt;P&gt;then i have to move the data from SDATA into one internal table for that specific segement data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did like  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at idoc_data.&lt;/P&gt;&lt;P&gt;           if idoc_data-segnam = c_E1BPAD1VL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           lw_E1BPAD1VL = idoc_data-SDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it is giving me error like I can't convert idoc_data-sdata to lw_e1bpad1vl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone guide me how to do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its bit urgent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your aniticipation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nitesha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839682#M665053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the data from segment to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839683#M665054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitesha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you have mentioned is correct...You need to check for segnam and transfer the data accordingly ...You can check any standard IDoc FM in the system and follow the same procesure to read the IDoc..For Ex: IDOC_INPUT_ACC_GOODS_MOVEMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      LOOP AT T_EDIDD INTO IDOC_DATA.

        CASE IDOC_DATA-SEGNAM.

          WHEN 'E1BPACHE02'.

            E1BPACHE02 = IDOC_DATA-SDATA.
            MOVE-CORRESPONDING E1BPACHE02
               TO DOCUMENTHEADER.                    

            IF E1BPACHE02-DOC_DATE
               IS INITIAL.
              CLEAR DOCUMENTHEADER-DOC_DATE.
            ENDIF.
            IF E1BPACHE02-PSTNG_DATE
               IS INITIAL.
              CLEAR DOCUMENTHEADER-PSTNG_DATE.
            ENDIF.

          WHEN 'E1BPACGL02'.

            E1BPACGL02 = IDOC_DATA-SDATA.
            MOVE-CORRESPONDING E1BPACGL02
               TO ACCOUNTGL.                                
.......
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is part of code from the above mentioned FM...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839683#M665054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the data from segment to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839684#M665055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry no message&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839684#M665055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the data from segment to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839685#M665056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the problem solved now my next thing is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to assing all these values to bapi structures  for this purpose I have to call a bapi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which way do u think would be preferrable like calling the bapi in the same loop assigning the values to the structures or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appending all the values to internal tables and then passing the values to the bapi structures...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:44:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839685#M665056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the data from segment to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839686#M665057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitesha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to build your Internal tables before passing it to BAPI...So, I suppose calling BAPI after filling Header and Item Internal tables would be good idea....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:53:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839686#M665057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the data from segment to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839687#M665058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Whenever you are calling the BAPI , the parameters should be passed based on the internal table values. First you need to different the data and fetch them into the internal table and then pass to the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggesstion is to use the BAPI after the loop is done and all the values are moved to the respective Internal tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the BAPI you are using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manju Beedam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 07:18:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfer-the-data-from-segment-to-internal-table/m-p/2839687#M665058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T07:18:46Z</dc:date>
    </item>
  </channel>
</rss>

