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 error: X is not allowed for LOGIC_SWITCH-PRICING

Former Member
0 Likes
4,820

Hi,

   BAPI 'BAPI_SALESORDER_CHANGE' is giving an error when trying to 're-determine the sales order item price' by passing 'logic_switch-pricing = 'X''. After gone though different OSS notes '574088, 593246, 449068, 403065, 410907 and 375016', found that it works for only B / C / G / space pricing types. Found that its working fine using VA05 and /AFS/MDC tcodes.

   Could any one know how to re-determine sales order price for pricing type X. any other options.

Thanks inadvance,

Satya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,518

Hi,

     Kindly refer SAP Note 24832 - Pricing rules / TVCPF for your requirement.

     It states that you have to take use of USEREXIT_PRICING_RULE in Program RV61AFZA. This is called after the setup of internal table STEU which defines the behavior of pricing types.

You need to maintain required configurations for pricing type X to allow this pricing condition.

Thanks,

Susmitha Pritam

Hi,

   BAPI 'BAPI_SALESORDER_CHANGE' is giving an error when trying to 're-determine the sales order item price' by passing 'logic_switch-pricing = 'X''. After gone though different OSS notes '574088, 593246, 449068, 403065, 410907 and 375016', found that it works for only B / C / G / space pricing types. Found that its working fine using VA05 and /AFS/MDC tcodes.

   Could any one know how to re-determine sales order price for pricing type X. any other options.

Thanks inadvance,

Satya

4 REPLIES 4
Read only

Kartik2
Contributor
0 Likes
2,518

Hi,

Did you have a look at fixed values of the domain 'KNPRS' ?? If so, then there all the allowed values are mentioned and your value 'X' is also present there with a description as "Customer reserve X". Please find out how to maintain required configurations to allow this pricing condition. Also you can search in scn with the key words "Customer reserve X" to find out relevant exits and copy routines involved.

Regards,

Kartik

Read only

Former Member
0 Likes
2,519

Hi,

     Kindly refer SAP Note 24832 - Pricing rules / TVCPF for your requirement.

     It states that you have to take use of USEREXIT_PRICING_RULE in Program RV61AFZA. This is called after the setup of internal table STEU which defines the behavior of pricing types.

You need to maintain required configurations for pricing type X to allow this pricing condition.

Thanks,

Susmitha Pritam

Read only

0 Likes
2,518

Karthik,

   I already checked this, i see X as fixed value for the Domain 'KNPRS'.

Susmitha,

   As per OSS note '24832' code was already written as below in the program 'RV61AFZA' & form 'userexit_pricing_rule'.

* OSS NOTE: 24832; Example #6;

*

   STEU-KNPRS = 'X'.

   STEU-KNTYP = 'GLRIEST...'.

   IF KOMK-KNUMA IS INITIAL.

     STEU-KOAID = 'CD........'.

   ELSE.

     STEU-KOAID = 'D.........'.

   ENDIF.

   STEU-MAUEB = ' '.

   APPEND STEU.

  Since from tcodes VA05 and /AFS/MDC working fine, not sure why its not working using BAPI 'BAPI_SALESORDER_CHANGE'.

Read only

0 Likes
2,518

Solved myself.

For future use, posting solution which i found.

Because of 'CONSTANTS: possible_pricing(4) VALUE ' BCG'. in the include LZ_FG_V45ATOP, getting an error from the below code,

*  if i_logic_switch-pricing cn possible_pricing.

*    sy-msgty = 'E'.

*    sy-msgid = 'V4'.

*    sy-msgno = '246'. "&1 nicht zulässig für LOGIC_SWITCH-PRICING

*    sy-msgv1 = i_logic_switch-pricing.

*    perform fehler_ausgeben tables return

*                            using 'LOGIC_SWITCH  '

*                                  '0'.

*    exit.

*  endif.

Copied FMs - BAPI_SALESORDER_CHANGE', SD_SALES_DOCU_MAINTAIN & SD_SALESDOCUMENT_CHANGE.

And commented above code in FM 'SD_SALES_DOCU_MAINTAIN'. Now ZBAPI_SALESORDER_CHANGE is working fine for pricing type X.

Thanks for all your above responses.