on 04-27-2009 3:29 PM
Hi Gurus,
I'm using the BAPI "BAPI_ROUTING_CREATE" for the creation of Routing.
I'm trying to pass the Standard Value (STD_VALUE_01) to the Operation Strucutre.
When i pass the Standard Value, the BAPI is giving the following error.
"*Enter a unit for standard value Reqmts*"
I think i'm missing some of the Parameters in the BAPI.
Please suggest me the parameter which one i'm missing.
I'm using the following parameters.
IT_BAPI1012_OPR_C-ACTIVITY = V1_VORNR.
IT_BAPI1012_OPR_C-CONTROL_KEY = IT_ITEM-STEUS.
IT_BAPI1012_OPR_C-WORK_CNTR = IT_ITEM-ARBPL.
IT_BAPI1012_OPR_C-PLANT = IT_ITEM-WERKS.
IT_BAPI1012_OPR_C-OPERATION_MEASURE_UNIT = IT_ITEM-PLNME.
IT_BAPI1012_OPR_C-OPERATION_MEASURE_UNIT_ISO = 'KMT'.
IT_BAPI1012_OPR_C-DESCRIPTION = IT_ITEM-LTXA1.
IT_BAPI1012_OPR_C-BASE_QUANTITY = '1.000'.
IT_BAPI1012_OPR_C-STD_VALUE_01 = IT_ITEM-STD_VALUE_01.
IT_BAPI1012_OPR_C-STD_UNIT_01 = 'D'.
IT_BAPI1012_OPR_C-STD_UNIT_01_ISO = 'DAY'.
IT_BAPI1012_OPR_C-DENOMINATOR = 1.
IT_BAPI1012_OPR_C-NOMINATOR = 1.
IT_BAPI1012_OPR_C-BASE_QUANTITY = 1.
APPEND IT_BAPI1012_OPR_C.
we are not using any machine or operator etc, in this scenario we don't require those things.
Thanks,
Adi.
self solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
whenever u pass a Quanity or Currency it is must to pass the coressponding unit. here in ur code i see u commented it. so, try to pass the STD_UNIT_01 to the structure and run.
also, you should use a CONVERSION routine for STD_UNIT_01 like below before passing it..
IT_BAPI1012_OPR_C-ACTIVITY = V1_VORNR.
IT_BAPI1012_OPR_C-CONTROL_KEY = IT_ITEM-STEUS.
IT_BAPI1012_OPR_C-WORK_CNTR = IT_ITEM-ARBPL.
IT_BAPI1012_OPR_C-PLANT = IT_ITEM-WERKS.
IT_BAPI1012_OPR_C-OPERATION_MEASURE_UNIT = IT_ITEM-PLNME.
IT_BAPI1012_OPR_C-OPERATION_MEASURE_UNIT_ISO = 'KMT'.
IT_BAPI1012_OPR_C-DESCRIPTION = IT_ITEM-LTXA1.
IT_BAPI1012_OPR_C-BASE_QUANTITY = '1.000'.
IT_BAPI1012_OPR_C-STD_VALUE_01 = IT_ITEM-STD_VALUE_01.
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
input = it_ka485-meins --> (it_ka485-meins = DAY)
language = sy-langu
IMPORTING
output = l_v_meins
EXCEPTIONS
unit_not_found = 1
OTHERS = 2.
lv_meins will have a value 'TAG' after from the above FM..
IT_BAPI1012_OPR_C-STD_UNIT_01 = l_v_meins.
IT_BAPI1012_OPR_C-STD_UNIT_01_ISO = 'DAY'.
IT_BAPI1012_OPR_C-DENOMINATOR = 1.
IT_BAPI1012_OPR_C-NOMINATOR = 1.
IT_BAPI1012_OPR_C-BASE_QUANTITY = 1.
APPEND IT_BAPI1012_OPR_C.
Hope it helps!!
Regards,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.