<?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: ERROR In PR BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-pr-bapi/m-p/8152191#M1621398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Requested date (field DELIV_DATE always in the format YYYYMMDD) and date category (field DEL_DATCAT (internal representation, e.g. 1 for current date) or DEL_DATCAT_EXT (external representation, e.g. T for current date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least the following data is required:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item counter (field PREQ_ITEM)&lt;/P&gt;&lt;P&gt;Material number (field MATERIAL)&lt;/P&gt;&lt;P&gt;The following can also be passed on as an alternative to the material number:&lt;/P&gt;&lt;P&gt;Material group (field MATL_GROUP) and&lt;/P&gt;&lt;P&gt;Short text (field SHORT_TEXT) and&lt;/P&gt;&lt;P&gt;Unit of measure (field PREQ_UNIT) and&lt;/P&gt;&lt;P&gt;Price (field PREQ_PRICE) and&lt;/P&gt;&lt;P&gt;Purchasing group (field PUR_GROUP)&lt;/P&gt;&lt;P&gt;If the material number is passed on, the material group, the short text etc., are adopted from the material master record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Sep 2011 08:53:55 GMT</pubDate>
    <dc:creator>JL23</dc:creator>
    <dc:date>2011-09-02T08:53:55Z</dc:date>
    <item>
      <title>ERROR In PR BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-pr-bapi/m-p/8152190#M1621397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir,&lt;/P&gt;&lt;P&gt;I'm getting error  while executing PR BAPI  i.e id delivery date. &lt;/P&gt;&lt;P&gt;but i'm not getting why?. &lt;/P&gt;&lt;P&gt;Please, help me.&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;Manoj. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; *&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZTEST_BAPI1
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  ZTEST_BAPI1.

DATA: BEGIN OF itab OCCURS 0,
      bsart(4),   "Purchase requisition document type
      werks(4),   "Plant
      menge(13),  "Purchase requisition quantity
      meins(3),   "Purchase requisition unit of measure
      matnr(18),  " material no
      eeind(8),
*      BSTYP ,
      END OF itab.

DATA: itab_bapiebanc  LIKE bapiebanc  OCCURS 0 WITH HEADER LINE.

DATA: BEGIN OF errmsg OCCURS 100.
        INCLUDE STRUCTURE bapiret2.
DATA: END OF errmsg.

DATA: errflag.


CALL FUNCTION 'UPLOAD'
 EXPORTING
*   CODEPAGE                      = ' '
   FILENAME                      = 'C:\ '
   FILETYPE                      = 'DAT'
*   ITEM                          = ' '
*   FILEMASK_MASK                 = ' '
*   FILEMASK_TEXT                 = ' '
*   FILETYPE_NO_CHANGE            = ' '
*   FILEMASK_ALL                  = ' '
*   FILETYPE_NO_SHOW              = ' '
*   LINE_EXIT                     = ' '
*   USER_FORM                     = ' '
*   USER_PROG                     = ' '
*   SILENT                        = 'S'
* IMPORTING
*   FILESIZE                      =
*   CANCEL                        =
*   ACT_FILENAME                  =
*   ACT_FILETYPE                  =
  TABLES
    DATA_TAB                      = itab
* EXCEPTIONS
*   CONVERSION_ERROR              = 1
*   INVALID_TABLE_WIDTH           = 2
*   INVALID_TYPE                  = 3
*   NO_BATCH                      = 4
*   UNKNOWN_ERROR                 = 5
*   GUI_REFUSE_FILETRANSFER       = 6
*   OTHERS                        = 7
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


         .
write sy-subrc.

LOOP AT itab.
  itab_bapiebanc-doc_type       =    itab-bsart.
* itab_bapiebanc-short_text     =    itab-txz01.
  itab_bapiebanc-quantity       =    itab-menge.
  itab_bapiebanc-unit           =    itab-meins.
  itab_bapiebanc-plant          =    itab-werks.
  itab_bapiebanc-material       =    itab-matnr.
*  itab_bapiebanc-BSTYP         =     itab-BSTYP.
  itab_bapiebanc-DELIV_DATE     =    itab-eeind .

  APPEND itab_bapiebanc.
ENDLOOP.
*
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
  TABLES
    requisition_items              = itab_bapiebanc
*    requisition_account_assignment = itab_bapiebkn
*    requisition_item_text          = itab_bapiebantx
    return                         = errmsg.




LOOP AT errmsg.
  IF errmsg-type EQ 'E'.
    WRITE:/'Error in function', errmsg-message.
    errflag = 'X'.
  ELSE.
    WRITE:/ errmsg-message.
  ENDIF.
ENDLOOP.


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 08:46:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-pr-bapi/m-p/8152190#M1621397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-02T08:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR In PR BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-pr-bapi/m-p/8152191#M1621398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Requested date (field DELIV_DATE always in the format YYYYMMDD) and date category (field DEL_DATCAT (internal representation, e.g. 1 for current date) or DEL_DATCAT_EXT (external representation, e.g. T for current date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least the following data is required:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item counter (field PREQ_ITEM)&lt;/P&gt;&lt;P&gt;Material number (field MATERIAL)&lt;/P&gt;&lt;P&gt;The following can also be passed on as an alternative to the material number:&lt;/P&gt;&lt;P&gt;Material group (field MATL_GROUP) and&lt;/P&gt;&lt;P&gt;Short text (field SHORT_TEXT) and&lt;/P&gt;&lt;P&gt;Unit of measure (field PREQ_UNIT) and&lt;/P&gt;&lt;P&gt;Price (field PREQ_PRICE) and&lt;/P&gt;&lt;P&gt;Purchasing group (field PUR_GROUP)&lt;/P&gt;&lt;P&gt;If the material number is passed on, the material group, the short text etc., are adopted from the material master record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 08:53:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-pr-bapi/m-p/8152191#M1621398</guid>
      <dc:creator>JL23</dc:creator>
      <dc:date>2011-09-02T08:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR In PR BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-pr-bapi/m-p/8152192#M1621399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi manoj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check as Jurgen told. Check the return parameters it will give a clear idea what and all fields are needed to  import.Small suggestion from my side use gui_upload or classes instead of upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 10:35:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-pr-bapi/m-p/8152192#M1621399</guid>
      <dc:creator>madhu_vadlamani</dc:creator>
      <dc:date>2011-09-02T10:35:49Z</dc:date>
    </item>
  </channel>
</rss>

