2006 Sep 21 3:10 AM
Hello Everyone!
I am using SD_SALESDOCUMENT_CREATE in creating sales documents order type YKE and YKR. I am successful in creating the sales orders, however, when i go in and check the order created, i can see that the order quantity is not being populated. Its value is always 0. I've tried changing the field type of my variable but i am successful.
Any suggestions are greatly appreciated!
Thanks in advance!
Jim
2006 Sep 21 3:13 AM
You need to debug your program and check on your order quantity inside your internal table, confirm whether there is any values inside it.
The most possible problem when your order quantity is not populated will be the order quantity inside your internal table contained no value.
You need to debug your program and check on your order quantity inside your internal table, confirm whether there is any values inside it.
The most possible problem when your order quantity is not populated will be the order quantity inside your internal table contained no value.
2006 Sep 21 3:13 AM
You need to debug your program and check on your order quantity inside your internal table, confirm whether there is any values inside it.
The most possible problem when your order quantity is not populated will be the order quantity inside your internal table contained no value.
2006 Sep 21 3:16 AM
I have already debugged it and there is a value passed to the Function Module.
2006 Sep 21 3:26 AM
2006 Sep 21 3:30 AM
Here it is.
i_sales_items_in-itm_number = v_item.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = i_tab3-matnr
IMPORTING
output = i_tab3-matnr.
IF sy-subrc <> 0. "#EC *
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: v_kwmeng_tmp LIKE rv45a-kwmeng.
DATA: v_kwmeng_tmp type dzmeng.
MOVE i_tab3-kwmeng TO v_kwmeng_tmp.
i_sales_items_in-material = i_tab3-matnr.
i_sales_items_in-plant = i_tab3-werks.
i_sales_items_in-batch = i_tab3-charg.
i_sales_items_in-target_qty = v_kwmeng_tmp.
i_sales_items_in-target_qu = i_tab3-vrkme.
i_sales_items_in-sales_unit = i_tab3-vrkme.
i_sales_items_in-target_val = i_tab3-netpr.
APPEND i_sales_items_in.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = v_sales_header_in
IMPORTING
salesdocument_ex = v_salesdocument_ex
TABLES
return = i_return
sales_items_in = i_sales_items_in
sales_partners = i_sales_partners
sales_conditions_in = i_sales_conditions_in "#EC *
sales_text = i_sales_text. "#EC ENHOK
2006 Sep 21 3:35 AM
Hi Jim
I think you are not populating SALES_HEADER_INX, SALES_ITEMS_INX, SALES_CONDITIONS_INX.
Please try populating the adove structure, tables and
pass to BAPI.
Kind Regards
Eswar
2006 Sep 21 3:35 AM
As simple as this, i believe that you changed your data type as below:
DATA: v_kwmeng_tmp LIKE rv45a-kwmeng.
DATA: v_kwmeng_tmp type dzmeng.
The first declaration where you commented should be working whereas the second 1 wont work.
The reason is if your check on the data type, kwmeng is QUAN and length 15 and dzmeng is QUAN length 13, thats make the different where your order quantity is not working.
2006 Sep 21 3:43 AM
DATA: v_kwmeng_tmp LIKE rv45a-kwmeng.
DATA: v_kwmeng_tmp type dzmeng.
I've already tried using either of the declaration from above but still not successfull in populating the order quantity of the created order.
2006 Sep 21 3:47 AM
How you declare i_tab3-kwmeng?
You must declare exactly the same data type as v_kwmeng_tmp.
2006 Sep 21 3:50 AM
2006 Sep 21 3:51 AM
Oh gosh!
how about this?
i_sales_items_in-target_qty = v_kwmeng_tmp.
i_sales_items_in-target_qty must also declare the same data type as v_kwmeng_tmp
2006 Sep 21 4:09 AM
2006 Sep 21 4:26 AM
Killing problem. lol
You sure your internal table TARGET_QTY got value before passing into the BAPI?
If really got value, I also dont know why already.
2006 Sep 21 6:50 AM
is the sales_items_in internal table the only table that should be filled-up when using SD_SALESDOCUMENT_CREATE?
i was wondering if there are other tables that need to be filled up...
thanks,
jim
2006 Sep 21 7:05 AM
Hi Jim
As mentioned in my earlier post, please populate entries for <b>SALES_HEADER_INX, SALES_ITEMS_INX, SALES_CONDITIONS_INX, SALES_SCHEDULES_IN & SALES_SCHEDULES_INX.</b>
By populating the schedule lines, i guess your problem will be resolved. Kindly check the same and let us know if it works.
Kind Regards
Eswar
2006 Sep 21 8:06 AM
2006 Sep 21 3:25 AM
HI Jim
Kindly check if you are passing like '1.000' or '0000...1.000'. I guess both makes difference.
Kind Regards
Eswar
2006 Sep 21 3:29 AM
are you passing a valid unit of measure associated with the quantity? eg, KG,EA etc
why is this commented out?
i_sales_items_in-target_qu = i_tab3-vrkme.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |