Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HEADER NOTE 1 HOW TO SEND IN BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
429

I AM USING THIS BAPI BUT I DONT KNOW HOW TO SEND THE DATA OF THIS HEADER NOTE 1 FIELD IN THIS BAPI.

BESIDES I WANT TO EXCTRACT THIS FIELD TO DISPLAY ON SCREEN BUT I AM UNABLE TO FIND ANY FIELD IN ANY TABLE..

I GOT TO KNOW THIS READT_TEXT FM ...WILL THAT WORK?

I AM USING THIS BAPI BUT I DONT KNOW HOW TO SEND THE DATA OF THIS HEADER NOTE 1 FIELD IN THIS BAPI.

BESIDES I WANT TO EXCTRACT THIS FIELD TO DISPLAY ON SCREEN BUT I AM UNABLE TO FIND ANY FIELD IN ANY TABLE..

I GOT TO KNOW THIS READT_TEXT FM ...WILL THAT WORK?

1 REPLY 1
Read only

Former Member
0 Likes
348

Hi,

In one of my programs I have:


loop at i_line into d_line.
  clear text.
  text-doc_number    = DATA2-SO_NO.
  text-itm_number    = 0.   "i.e. header
  text-text_id       = '0001'.
  text-langu         = 'EN'.
  text-format_col    = '*'.
  text-text_line     = d_line.
  text-function      = '009'.
  append text to texts.
  endloop.

but of course you will need your own values for some of these fields,

and


* create sales order
* (but needs to be committed to make it 'stick')
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
  EXPORTING
    SALESDOCUMENTIN               = vbeln
    order_header_in               = header
    ORDER_HEADER_INX              = headerx
    BEHAVE_WHEN_ERROR             = 'P'
  tables
    RETURN                        = returns
    ORDER_ITEMS_IN                = items
    ORDER_ITEMS_INX               = itemsx
    order_partners                = partners
    ORDER_SCHEDULES_IN            = schedules
    ORDER_SCHEDULES_INX           = schedulesx
    ORDER_CONDITIONS_IN           = conditions
    ORDER_CONDITIONS_INX          = conditionsx
    ORDER_TEXT                    = texts.

Hope this helps.

John