2013 Jun 07 8:57 AM
Dear experts,
When i use function BAPI_OUTB_DELIVERY_CREATENOREF for create oubound delivery whithout order reference, but it show an three errors
" Sales unit is not valid for item 000001",
"Item category is not defined",
"Enter a material number for item 000001"
below is mycode:
LW_SHIP_POINT1 = LPS_DATA-SHIP_POINT.
LW_Detype = 'ZHVC'.
LW_saleorg = LPS_DATA-SALES_ORG.
LwDISTR_CHAN = LPS_DATA-DISTR_CHAN.
Lw_divison = LPS_DATA-DIVISION.
Lw_shipto = LPS_DATA-PARTN_NUMB.
Lw_date-DELIV_NUMB = LPS_DATA-DOC_DATE.
Lw_date-TIMEZONE = tz.
Lw_date-TIMETYPE = 'WSHDRWADAT'.
CONVERT DATE LPS_DATA-DOC_DATE TIME tim DAYLIGHT SAVING TIME 'X'
INTO TIME STAMP time_stamp TIME ZONE tz .
Lw_date-TIMESTAMP_UTC = time_stamp.
APPEND lw_date.
LT_item-MATERIAL = LPS_DATA-MATERIAL.
LT_item-ITEM_CATEG = 'ZHVC'.
LT_item-DLV_QTY = LPS_DATA-REQ_QTY_QC.
LT_item-SALES_UNIT = LPS_DATA-SALES_UNIT.
LT_item-PLANT = LPS_DATA-PLANT.
LT_item-STGE_LOC = LPS_DATA-STORE_LOC.
LT_item-SALES_UNIT_ISO = LPS_DATA-SALES_UNIT.
APPEND LT_item.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATENOREF'
EXPORTING
SHIP_POINT = LW_SHIP_POINT1
DLV_TYPE = LW_Detype
SALESORG = LW_saleorg
DISTR_CHAN = LwDISTR_CHAN
DIVISION = Lw_divison
SHIP_TO = Lw_shipto
* DATE_USAGE = '0'
NO_DEQUEUE = 'X'
IMPORTING
DELIVERY = LW_DELIVERY1
TABLES
DATES = Lw_date
DLV_ITEMS = LT_item
RETURN = LT_RETURN.
PLZ sugguest
Best Regards,
Tunt
2013 Jun 07 9:58 AM
Hi Quang,
Both field Material and Sales unit having "Convers. Routine " , check both domain have "Convers. Routine ".
Use Convers. Routine for
FM
CONVERSION_EXIT_MATN1_INPUT (MATERIAL)
CONVERSION_EXIT_CUNIT_INPUT (SALES_UNIT)
Regard's
Smruti
2013 Jun 07 10:36 AM
Dear Smruti,
i Use Convers. Routine but error still come
Best Regards
Tunt
2013 Jun 07 11:04 AM
May i know is it same above error ?
Provide Error message and Number or provide screen shot ?
Regard's
Smruti
2013 Jun 07 11:20 AM
2013 Jun 07 11:41 AM
Hi,
1.first issue is the system itself display.please contact Functional.
2.sales unit what your passing for the item 000001 is not suitable.please pass the correct one.
3.item category is not defined for this item.
4.you might me forgot to pass the material no.
Try to Debug the code and check once.
Regards,
Gurunath
2013 Jun 07 12:02 PM
Dear Quang,
Check below screen Shot .
i hope you are passing both SALES_UNIT and SALES_UNIT_ISO as per above Screen Shot#2
So Read below Documentation which is Provide by SAP , Specially above two field's .
Note : I hope you already read the FM Documentation .
Regard's
Smruti
2013 Jun 07 12:10 PM
Dear Experts
this my new code after use conver function:
LW_SHIP_POINT1 = LPS_DATA-SHIP_POINT.
LW_Detype = 'ZHVC'.
LW_saleorg = LPS_DATA-SALES_ORG.
LwDISTR_CHAN = LPS_DATA-DISTR_CHAN.
Lw_divison = LPS_DATA-DIVISION.
Lw_shipto = LPS_DATA-PARTN_NUMB.
Lw_date-DELIV_NUMB = LPS_DATA-DOC_DATE.
Lw_date-TIMEZONE = tz.
Lw_date-TIMETYPE = 'WSHDRWADAT'.
CONVERT DATE LPS_DATA-DOC_DATE TIME tim DAYLIGHT SAVING TIME 'X'
INTO TIME STAMP time_stamp TIME ZONE tz .
Lw_date-TIMESTAMP_UTC = time_stamp.
APPEND lw_date.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = LPS_DATA-MATERIAL
IMPORTING
OUTPUT = test2.
LT_item-MATERIAL = test2.
LT_item-ITEM_CATEG = 'ZHVC'.
LT_item-DLV_QTY = LPS_DATA-REQ_QTY_QC.
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = LPS_DATA-SALES_UNIT
IMPORTING
OUTPUT = test1.
LT_item-SALES_UNIT = test1.
LT_item-PLANT = LPS_DATA-PLANT.
LT_item-STGE_LOC = LPS_DATA-STORE_LOC.
LT_item-SALES_UNIT_ISO = LPS_DATA-SALES_UNIT.
APPEND LT_item.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATENOREF'
EXPORTING
SHIP_POINT = LW_SHIP_POINT1
DLV_TYPE = LW_Detype
SALESORG = LW_saleorg
DISTR_CHAN = LwDISTR_CHAN
DIVISION = Lw_divison
SHIP_TO = Lw_shipto
* DATE_USAGE = '0'
NO_DEQUEUE = 'X'
IMPORTING
DELIVERY = LW_DELIVERY1
TABLES
DATES = Lw_date
DLV_ITEMS = LT_item
RETURN = LT_RETURN.
Regards,
Tunt
2013 Jun 07 12:33 PM
Remove this Line "LT_item-SALES_UNIT_ISO = LPS_DATA-SALES_UNIT."
already you use
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = LPS_DATA-SALES_UNIT
IMPORTING
OUTPUT = test1.
Note : use any one of them "SALES_UNIT_ISO" or "SALES_UNIT" .
Regard's
Smruti
2013 Jun 10 7:21 AM
2013 Jun 13 5:30 AM
2013 Jun 07 10:15 AM
Quang Le Vinh wrote:
errors
" Sales unit is not valid for item 000001", -> 1
"Item category is not defined", -> 2
"Enter a material number for item 000001" -> 3
1. in your code LT_item-SALES_UNIT = LPS_DATA-SALES_UNIT , before passing sales unit value, can you use conversion routine for that,
just go to that field in SE11 , check conversion routine for that and double click you will get one popup window with relevant which FM's we need to use.
2. same thing applicable for material number also .LT_item-MATERIAL = LPS_DATA-MATERIAL.check conversion routine for that in SE11.
3.these things you didnt use in your code , that's why it's giving error like 'Item category is not defined'.
already Smruti Ranjan Mohanty mentioned those relevant fm's very faster
Regards,
Bastin.G
2013 Jun 07 11:11 AM
Dear experts,
after execute function BAPI_OUTB_DELIVERY_CREATENOREF the system have three error as above , the system have create oubound delivery as successful in table LIPS but have not value of MATNR field and WERKS field
Regards,
Tunt
2013 Jun 07 11:35 AM
Dear Quang Le Vinh
Check both the matnr and werks declaration in program.
LT_item-MATERIAL = LPS_DATA-MATERIAL.
LT_item-PLANT = LPS_DATA-PLANT.
make sure both the fields having the same declaration in program
anyway lt_item internal table you have referred bapi internal table only right .
if not means, in SE37,goto that bapi internal table and double click then it will navigate into table , there material and plant how their defined in se11 ? that should be match with your passing values (lps_data)
Regards,
Bastin.G
2013 Jun 07 11:14 AM