Skip to Content
author's profile photo Former Member
Former Member

query regd. an FM

Hi,

Is anyone aware of an FM that takes in the sales document number as input and gives as output the header and item level details into an internal table, or only the item level details...into an internal table

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 06:57 AM

    Hi,

    BAPISDORDER_GETDETAILEDLIST

    Regards,

    Maxim.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      vijay,

      I_BAPI_VIEW is used to specify target attributes you have to recieve from FM. I_MEMORY_READ should be empty for FM to request data base.

      So to get sales order header and items details proceed as follows:

      DATA:

      it_sales_document TYPE STANDARD TABLE OF sales_key,

      wa_sales_document LIKE LINE OF it_sales_document,

      it_order_headers TYPE STANDARD TABLE OF bapisdhd,

      it_order_items TYPE STANDARD TABLE OF bapisdit,

      wa_bapi_view TYPE order_view.

      wa_bapi_view-header = 'X'.

      wa_bapi_view-item = 'X'.

      wa_sales_document-vbeln = 'ORDER NUMBER'.

      APPEND wa_sales_document TO it_sales_document.

      CALL FUNCTION 'BAPISDORDER_GETDETAILEDLIST'

      EXPORTING

      i_bapi_view = wa_bapi_view

      • I_MEMORY_READ =

      TABLES

      sales_documents = it_sales_document

      order_headers_out = it_order_headers

      order_items_out = it_order_items

      • ORDER_SCHEDULES_OUT =

      • ORDER_BUSINESS_OUT =

      • ORDER_PARTNERS_OUT =

      • ORDER_ADDRESS_OUT =

      • ORDER_STATUSHEADERS_OUT =

      • ORDER_STATUSITEMS_OUT =

      • ORDER_CONDITIONS_OUT =

      • ORDER_COND_HEAD =

      • ORDER_COND_ITEM =

      • ORDER_COND_QTY_SCALE =

      • ORDER_COND_VAL_SCALE =

      • ORDER_CONTRACTS_OUT =

      • ORDER_TEXTHEADERS_OUT =

      • ORDER_TEXTLINES_OUT =

      • ORDER_FLOWS_OUT =

      • ORDER_CFGS_CUREFS_OUT =

      • ORDER_CFGS_CUCFGS_OUT =

      • ORDER_CFGS_CUINS_OUT =

      • ORDER_CFGS_CUPRTS_OUT =

      • ORDER_CFGS_CUVALS_OUT =

      • ORDER_CFGS_CUBLBS_OUT =

      • ORDER_CFGS_CUVKS_OUT =

      • ORDER_BILLINGPLANS_OUT =

      • ORDER_BILLINGDATES_OUT =

      • ORDER_CREDITCARDS_OUT =

      • EXTENSIONOUT =

      .

      it_order_headers contains sales order header data.

      it_order_items contains sales order items data.

      Regards,

      Maxim.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 06:47 AM

    anyone...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.