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

BAPI_SALESORDER_CHANGE

bhargava_dns
Participant
0 Likes
818

Hi everybody,

I am using BAPI_SALESORDER_CHANGE  to update the header fields reason_rejection and bill_block.

            ORDER_HEADERS_INC-ORD_REASON = 'zcr'

            ORDER_HEADERS_INC-BILL_BLOCK = space.

            L_ORDER_HEADER_INX-UPDATEFLAG = 'U'.

             l_order_header_inx-ord_reason = 'X'.

             l_order_header_inx-bill_block = 'X'.


When the new value is updated and passed to the BAPI i am getting the following error ----

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

               EXPORTING

                 SALESDOCUMENT    =  saledoc_num

                 ORDER_HEADER_IN  = ORDER_HEADERS_INC

                 ORDER_HEADER_INX = l_ORDER_HEADER_INX

               TABLES

                 RETURN           = return1.

In the function module interface, you can specify only

fields of a specific type and length under "ORDER_HEADER_IN".

Although the currently specified field

"ORDER_HEADERS_INc" is the correct type, its length is incorrect.

please let me know what are the changes i need to do.

Hi everybody,

I am using BAPI_SALESORDER_CHANGE  to update the header fields reason_rejection and bill_block.

            ORDER_HEADERS_INC-ORD_REASON = 'zcr'

            ORDER_HEADERS_INC-BILL_BLOCK = space.

            L_ORDER_HEADER_INX-UPDATEFLAG = 'U'.

             l_order_header_inx-ord_reason = 'X'.

             l_order_header_inx-bill_block = 'X'.


When the new value is updated and passed to the BAPI i am getting the following error ----

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

               EXPORTING

                 SALESDOCUMENT    =  saledoc_num

                 ORDER_HEADER_IN  = ORDER_HEADERS_INC

                 ORDER_HEADER_INX = l_ORDER_HEADER_INX

               TABLES

                 RETURN           = return1.

In the function module interface, you can specify only

fields of a specific type and length under "ORDER_HEADER_IN".

Although the currently specified field

"ORDER_HEADERS_INc" is the correct type, its length is incorrect.

please let me know what are the changes i need to do.

2 REPLIES 2
Read only

Former Member
0 Likes
669

Hi ,

Check with below line also Pass "Order Number" Leading with Zero's  or Use FM "CONVERSION_EXIT_ALPHA_INPUT" before assign value to BAPI Sales Document Number .

ORDER_HEADERS_INC-ORD_REASON = 'zcr'   'ZCR' .

Regard's

Smruti

Read only

Former Member
0 Likes
669

Hi

data type of ORD_REASON is  AUGRU  and this domain has a value range table.

It means that you can give value that is not in the table TVAU.

check the TVAU table  and give a correct value.


Reza Rostami - Abap developer at saphiran.com