<?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 Re: Read Table mapping between BSEG and CSKS table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808505#M1468626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Move the ENDIF that is now after the SELECT FROM csks after the LOOP on bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Apr 2010 18:47:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-19T18:47:25Z</dc:date>
    <item>
      <title>Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808499#M1468620</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;my requirement is to extract the following fields from bseg table with BKPF (Header table).&lt;/P&gt;&lt;P&gt;1. Value Date, &lt;/P&gt;&lt;P&gt;2. Posting Date, &lt;/P&gt;&lt;P&gt;3. Company Code, &lt;/P&gt;&lt;P&gt;4.&lt;/P&gt;&lt;P&gt;5. Partner Profit Center, &lt;/P&gt;&lt;P&gt;6. Account Number, &lt;/P&gt;&lt;P&gt;7. Amt in Local currency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sequence 4 Profit Center field should need to extract from CSKS Table (CSKS-PRCTR). &lt;/P&gt;&lt;P&gt;for this i need to check COST CENTER (BSEG-KOSTL) field in BSEG then extract Profit Center from CSKS table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the CSKS-PRCTR value in IT_CSKS, But in read talbe the value is not moving to final internal table, &lt;/P&gt;&lt;P&gt;Can anyone help me what is correct mapping in Read table between BSEG and CSKS Table. (common field b/w two table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly please advise.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;skumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 17:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808499#M1468620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T17:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808500#M1468621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;read first the entries from BSEG based on your selection including the fields KOKRS and KOSTL into a internal table and then try to map  both the fileds  KOKRS and KOSTL into CSKS table. It should work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;Abhi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 17:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808500#M1468621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T17:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808501#M1468622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;below is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Apr 19, 2010 1:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 17:32:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808501#M1468622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T17:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808502#M1468623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is my code. &lt;/P&gt;&lt;P&gt;SELECT BUKRS BELNR GJAHR MONAT BUDAT FROM BKPF&lt;/P&gt;&lt;P&gt;      	INTO TABLE IT_BKPF&lt;/P&gt;&lt;P&gt;      	&lt;/P&gt;&lt;P&gt;SELECT BUKRS BELNR GJAHR SHKZG DMBTR &lt;/P&gt;&lt;P&gt;       HKONT KOSTL PRCTR PPRCT FROM BSEG&lt;/P&gt;&lt;P&gt;         INTO CORRESPONDING FIELDS OF TABLE IT_BSEG FOR ALL ENTRIES IN IT_BKPF&lt;/P&gt;&lt;P&gt;           WHERE BELNR   = IT_BKPF-BELNR&lt;/P&gt;&lt;P&gt;                                         &lt;/P&gt;&lt;P&gt;SELECT KOKRS KOSTL BUKRS PRCTR FROM CSKS INTO TABLE IT_CSKS&lt;/P&gt;&lt;P&gt;         FOR ALL ENTRIES IN IT_BSEG&lt;/P&gt;&lt;P&gt;           WHERE KOKRS = IT_BSEG-KOKRS&lt;/P&gt;&lt;P&gt;            AND  KOSTL = IT_BSEG-KOSTL&lt;/P&gt;&lt;P&gt;            AND  BUKRS = IT_BSEG-BUKRS.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_BSEG.                                                &lt;/P&gt;&lt;P&gt;        IT_FINAL-BUKRS = IT_BSEG-BUKRS.                       &lt;/P&gt;&lt;P&gt;        READ TABLE IT_CSKS WITH KEY KOKRS = IT_BSEG-KOKRS 	&lt;/P&gt;&lt;P&gt;                                    KOSTL = IT_BSEG-KOSTL&lt;/P&gt;&lt;P&gt;                                     BUKRS = IT_BSEG-BUKRS. &lt;/P&gt;&lt;P&gt;        IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;        IT_FINAL-PRCTR = IT_CSKS-PRCTR2.                     &lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      APPEND IT_FINAL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;please advise. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: skumar.merp on Apr 19, 2010 7:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 17:51:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808502#M1468623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T17:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808503#M1468624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you aren't checking sy-subrc after the SELECT on BSEG. You may not be returning any records there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 18:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808503#M1468624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T18:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808504#M1468625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhi &amp;amp; Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks lot for reply.  Sorry I am new to abap, itab mappings are quite confusing , I understand i need to use sy-subrc check. select from bkpf into it_bkpf(Header data)&lt;/P&gt;&lt;P&gt;select from bseg into it_bseg(Line Item)&lt;/P&gt;&lt;P&gt;if sy-subrc =0&lt;/P&gt;&lt;P&gt;select from csks into it_csks (Profit Center)&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_bseg.&lt;/P&gt;&lt;P&gt;move it_bseg field to it_final.&lt;/P&gt;&lt;P&gt;READ TABLE IT_CSKS WITH KEY KOKRS =IT_BSEG-KOKRS &lt;/P&gt;&lt;P&gt;                                                      KOSTL = IT_BSEG-KOSTL&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;IT_FINAL-PRCTR = IT_CSKS-PRCTR2. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;write statements...&lt;/P&gt;&lt;P&gt;please advice the above points are correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;skumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 18:37:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808504#M1468625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T18:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808505#M1468626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Move the ENDIF that is now after the SELECT FROM csks after the LOOP on bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 18:47:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808505#M1468626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T18:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808506#M1468627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;use WHERE condition as the table would have lot of data otherwise to read from BKPF&amp;gt;&lt;/P&gt;&lt;P&gt;SELECT BUKRS BELNR GJAHR MONAT BUDAT FROM BKPF&lt;/P&gt;&lt;P&gt;INTO TABLE IT_BKPF     WHERE  &amp;lt;conditions&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;   SELECT BUKRS BELNR GJAHR SHKZG DMBTR &lt;/P&gt;&lt;P&gt;                 HKONT KOSTL PRCTR PPRCT FROM BSEG&lt;/P&gt;&lt;P&gt;                 INTO CORRESPONDING FIELDS OF TABLE IT_BSEG &lt;/P&gt;&lt;P&gt;                  FOR ALL ENTRIES IN IT_BKPF  WHERE BELNR = IT_BKPF-BELNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                 if sy-subrc = 0. &lt;/P&gt;&lt;P&gt;                          SELECT KOKRS KOSTL BUKRS PRCTR FROM CSKS INTO TABLE IT_CSKS&lt;/P&gt;&lt;P&gt;                                         FOR ALL ENTRIES IN IT_BSEG&lt;/P&gt;&lt;P&gt;                                         WHERE KOKRS = IT_BSEG-KOKRS&lt;/P&gt;&lt;P&gt;                                              AND KOSTL =  IT_BSEG-KOSTL&lt;/P&gt;&lt;P&gt;                                              AND BUKRS =  IT_BSEG-BUKRS.&lt;/P&gt;&lt;P&gt;                          if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;                                    SORT IT_CSKS BY KOKRS&lt;/P&gt;&lt;P&gt;                                                                    KOSTL.&lt;/P&gt;&lt;P&gt;                          LOOP AT IT_BSEG. &lt;/P&gt;&lt;P&gt;                                          IT_FINAL-BUKRS = IT_BSEG-BUKRS. &lt;/P&gt;&lt;P&gt;                                          READ TABLE IT_CSKS WITH KEY KOKRS = IT_BSEG-KOKRS                                                                                &lt;/P&gt;&lt;P&gt;KOSTL = IT_BSEG-KOSTL  BINARY SEARCH.&lt;/P&gt;&lt;P&gt;                                          IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;                                                  IT_FINAL-PRCTR = IT_CSKS-PRCTR2. &lt;/P&gt;&lt;P&gt;                                          ENDIF.&lt;/P&gt;&lt;P&gt;                                         APPEND IT_FINAL.&lt;/P&gt;&lt;P&gt;                                        CLEAR IT_FINAL.&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;endif.&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;Thanks&lt;/P&gt;&lt;P&gt;Abhi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 18:49:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808506#M1468627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T18:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808507#M1468628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhi &amp;amp; Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got better understading. Thank you very much for kind assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;skumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 19:02:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808507#M1468628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T19:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808508#M1468629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When querying BSEG you should use all fields from BKPF primary key not just BELNR.&lt;/P&gt;&lt;P&gt;You can have the same doc number in different years or company codes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 20:37:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808508#M1468629</guid>
      <dc:creator>former_member182670</dc:creator>
      <dc:date>2010-04-19T20:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table mapping between BSEG and CSKS table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808509#M1468630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All my program is working now thank you for helpful source codes and ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Skumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Apr 2010 11:38:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-mapping-between-bseg-and-csks-table/m-p/6808509#M1468630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-22T11:38:09Z</dc:date>
    </item>
  </channel>
</rss>

