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

Problem with ....BAPI_SALESORDER_CREATEFROMDATA .....!

Former Member
0 Likes
696

Hi friends ,

I m using  BAPI_SALESORDER_CREATEFROMDATA to upload sales orders type ZO23 & ZO24 .......while uploading the profit center is automatically taking ......but user wants to enter it manually in the excel........but there is no field in the BAPI.....so please help me out how to fetch it ....!!!! Helpful answers will be rewarded........!

Regards,

Suresh

4 REPLIES 4
Read only

Former Member
0 Likes
581

Please reply guys if u know the solution.

Read only

0 Likes
581

Hi,

Are you able to specify the profit centre when you create a Sales Order manually, through the standard transaction?

If YES, put a breakpoint in BAPI_SALESORDER_CREATEFROMDATA and see how it passes the profit centre in as a parameter.

If NO, you are out of luck.

cheers

Paul

Read only

Former Member
0 Likes
581

Hi Suresh.

Use this BAPI instead. -'BAPI_SALESORDER_CREATEFROMDAT2

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'

    EXPORTING

  •     SALESDOCUMENTIN               =

      order_header_in               = it_header     order_header_inx               = it_headerx

  •     SENDER                        =
  •     BINARY_RELATIONSHIPTYPE       =

      int_number_assignment         = 'X'

  •     BEHAVE_WHEN_ERROR             =
  •     LOGIC_SWITCH                  =
  •     TESTRUN                       =
  •     CONVERT                       = ' '

   IMPORTING

     salesdocument                  = g_vbeln

    TABLES

      return                        = it_return

     order_items_in                = it_item

      order_items_inx               = it_itemx

      order_partners                = it_partner

    wa_item-profit_ctr = wa_itab-prftcnt.

    wa_itemx-profit_ctr = 'X'.

   APPEND wa_item TO it_item.

    APPEND wa_itemx TO it_itemx.

The internal tables order_items_in  has profit center field, and it must be checked in the checkbox field for profit center in    order_items_inx               = it_itemx

Read only

0 Likes
581

Hi Susmitha,

I tried with BAPI_SALESORDER_CREATEFROMDAT2 for the type ZO23 & ZO24 it is throwing  Some error BUS2032 is not possible category 'L'...thats why im using BAPI_SALESORDER_CREATEFROMDATA .

Regards,

Suresh