<?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: bdc report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703819#M1295423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i need to use only BDC..not bapi...i m unable to pass that 'P+' vlaue...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jun 2009 17:05:19 GMT</pubDate>
    <dc:creator>former_member515329</dc:creator>
    <dc:date>2009-06-04T17:05:19Z</dc:date>
    <item>
      <title>bdc report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703814#M1295418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have written report for BDC for creating of sales order by VA01 tcode by uploading a file...i have done with file pickup and populating to perform fields...i m unable to handle table control becoz i may get many materials and quantity feilds to be created for one sales order..my condition is "A separate Sales Order will be created for each combination of Sold-To &amp;amp; Ship-To parties. A Sold-To party may have several Ship-To parties assigned to it. Lines having same combination of SoldTo u2013 ShipTo parties should be added to one Sales Order. A separate Sales Order will be created if a line has different Ship-To party even if the Sold-To remains same "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is code for it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at i_input_bdc into wa_input_bdc.
perform bdc_dynpro      using 'SAPMV45A' '0101'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBAK-SPART'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.

perform bdc_field       using 'VBAK-AUART'
                              p_auart.
perform bdc_field       using 'VBAK-VKORG'
                              p_vkorg.
perform bdc_field       using 'VBAK-VTWEG'
                              p_vtweg.
perform bdc_field       using 'VBAK-SPART'
                              p_spart.

perform bdc_dynpro      using 'SAPMV45A' '4001'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'VBKD-BSTKD'
                              v_po_number.
perform bdc_field       using 'KUAGV-KUNNR'
                              wa_input_bdc-soldto.
perform bdc_field       using 'KUWEV-KUNNR'
                              wa_input_bdc-shipto.
perform bdc_field       using 'VBAK-BSARK'
                              p_bsark.

perform bdc_field       using 'BDC_CURSOR'
                              'RV45A-KWMENG(02)'.
perform bdc_field       using 'RV45A-MABNR(01)'
*                              record-MABNR_01_009.
                              wa_input_bdc-matnr.
perform bdc_field       using 'RV45A-MABNR(02)'
*                              record-MABNR_02_010.
                              wa_input_bdc-matnr.
perform bdc_field       using 'RV45A-KWMENG(01)'
*                              record-KWMENG_01_011.
                              v_kwmeng1.
perform bdc_field       using 'RV45A-KWMENG(02)'
*                              record-KWMENG_02_012.
                              v_kwmeng1.

perform bdc_dynpro      using 'SAPLSPO2' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '=OPT1'.


  ON CHANGE OF wa_input_bdc-soldto.
      ON CHANGE OF wa_input_bdc-shipto.

        PERFORM insert_bdc USING 'VA01'.
        CLEAR wa_input_bdc.
        REFRESH i_bdcdata.
*---------------------------------------
      ENDON.
    ENDON.

  ENDLOOP.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 08:24:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703814#M1295418</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2009-06-04T08:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: bdc report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703815#M1295419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ravi,&lt;/P&gt;&lt;P&gt;can you send me your query in details in code format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 08:43:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703815#M1295419</guid>
      <dc:creator>SujeetMishra</dc:creator>
      <dc:date>2009-06-04T08:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: bdc report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703816#M1295420</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;Instead of BDC try BAPI BAPI_SALESORDER_CREATEFROMDAT2 to create sales order,&lt;/P&gt;&lt;P&gt;You need to sort the internal table before loop statment.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT i_input_bdc INTO wa_input_bdc.
  CLear g_insert.

  ON CHANGE OF wa_input_bdc-soldto.
     G_insert = 'X'.
  ENDON.

  ON CHANGE OF wa_input_bdc-shipto.
    g_insert = 'X'.
  ENDON.

  IF g_insert EQ 'X'.
" Call Bapi or BDC... there is change in the combination
  Endif.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 08:54:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703816#M1295420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T08:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: bdc report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703817#M1295421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use BAPI instead, example: BAPI_SALESORDER_CREATEFROMDAT2&lt;/P&gt;&lt;P&gt;regards,darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 08:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703817#M1295421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T08:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: bdc report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703818#M1295422</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;          In bdc code, to upload data in table control, do not specify hardcoded number in brakets. Declare one verialble which will be increased by 1 for each record of one sales order. First check how many rows are there in table control for one page. And give the condition if that variable is grater than the rows in one page then use '+P' Ok code ( i.e. Page up), then again reset the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope, it will help u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Poonam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 12:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703818#M1295422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T12:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: bdc report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703819#M1295423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i need to use only BDC..not bapi...i m unable to pass that 'P+' vlaue...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 17:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703819#M1295423</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2009-06-04T17:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: bdc report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703820#M1295424</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;   See the bellow code, which I m using to upload with holding tax data of vendors. In that screen, table control exists which I m using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT ITAB.


IF TEMP_BUKRS &amp;lt;&amp;gt; ITAB-BUKRS OR TEMP_LIFNR &amp;lt;&amp;gt; ITAB-LIFNR.


   IF FLAG EQ 'X'.

    PERFORM BDC_FIELD1       USING 'BDC_OKCODE'
                                '=UPDA'.
    PERFORM BDC_TRANSACTION USING 'XK02'.
    CLEAR FLAG.
    CLEAR V_NO.

  ENDIF.


  PERFORM BDC_DYNPRO1      USING 'SAPMF02K' '0101'.
  PERFORM BDC_FIELD1       USING 'BDC_CURSOR'
                                'RF02K-D0610'.
  PERFORM BDC_FIELD1       USING 'BDC_OKCODE'
                                '/00'.
  PERFORM BDC_FIELD1       USING 'RF02K-LIFNR'
                                  ITAB-LIFNR.
  PERFORM BDC_FIELD1       USING 'RF02K-BUKRS'
                                  ITAB-BUKRS.
  PERFORM BDC_FIELD1       USING 'RF02K-D0610'
                                'X'.


  PERFORM BDC_DYNPRO1      USING 'SAPMF02K' '0610'.

  PERFORM BDC_FIELD1       USING 'BDC_CURSOR'
                                'LFBW-WT_EXDF(01)'.

  PERFORM BDC_FIELD1       USING 'LFBW-WITHT(01)'
                                  ITAB-QSSKZ.

  PERFORM BDC_FIELD1       USING 'LFBW-WT_WITHCD(01)'
                                  ITAB-QSSKZ.

  PERFORM BDC_FIELD1       USING 'LFBW-QSREC(01)'
                                   ITAB-QSREC.

FLAG = 'X'.
ADD 2 TO V_NO.

ELSE.

 IF V_NO NE 6.

CONCATENATE 'LFBW-WT_EXDF(' V_NO ')' INTO V_FLD.
 CONDENSE V_FLD.
  PERFORM BDC_FIELD1       USING 'BDC_CURSOR'
                                  V_FLD.

CONCATENATE 'LFBW-WITHT(' V_NO ')' INTO V_FLD.
 CONDENSE V_FLD.

  PERFORM BDC_FIELD1       USING  V_FLD
                                ITAB-QSSKZ.

CONCATENATE 'LFBW-WT_WITHCD(' V_NO ')' INTO V_FLD.
 CONDENSE V_FLD.

  PERFORM BDC_FIELD1       USING  V_FLD
                                ITAB-QSSKZ.


CONCATENATE 'LFBW-QSREC(' V_NO ')' INTO V_FLD.
CONDENSE V_FLD.

  PERFORM BDC_FIELD1       USING    V_FLD
                                  ITAB-QSREC.

  ADD 1 TO V_NO.

ELSE.

CONCATENATE 'LFBW-WT_EXDF(' V_NO ')' INTO V_FLD.
 CONDENSE V_FLD.
  PERFORM BDC_FIELD1       USING 'BDC_CURSOR'
                                  V_FLD.

CONCATENATE 'LFBW-WITHT(' V_NO ')' INTO V_FLD.
 CONDENSE V_FLD.

  PERFORM BDC_FIELD1       USING  V_FLD
                                ITAB-QSSKZ.

CONCATENATE 'LFBW-WT_WITHCD(' V_NO ')' INTO V_FLD.
 CONDENSE V_FLD.

  PERFORM BDC_FIELD1       USING  V_FLD
                                ITAB-QSSKZ.

CONCATENATE 'LFBW-QSREC(' V_NO ')' INTO V_FLD.
CONDENSE V_FLD.

  PERFORM BDC_FIELD1       USING    V_FLD
                                  ITAB-QSREC.

 perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.

 perform bdc_dynpro      using 'SAPMF02K' '0610'.

 V_NO = 1.

ENDIF.

ENDIF.

TEMP_BUKRS = ITAB-BUKRS.
TEMP_LIFNR = ITAB-LIFNR.

ENLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Hope, it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Poonam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 08:27:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-report/m-p/5703820#M1295424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T08:27:03Z</dc:date>
    </item>
  </channel>
</rss>

