01-17-2008 3:54 PM
Hi All,
I am using the FM SD_SALESDOCUMENT_CREATE to create a Sales Order. Everything is fine apart from two issues that I am struggling with..
1. I wish to assign a condition type ZNET with a Amount Value of 0 and a condition value that is populated with a variable. I can do it manually no problem but when I crate it with the program it only creates the condition type but doesnt assign the values I want.
2. I would like to add text to the item note. Does anyone know where I should put my text?
Many thanks for any help you can give, it is much appreciated,
Points Awarded,
Colm
01-17-2008 3:58 PM
You may need to use the function SAVE_TEXT to create the text object.
01-17-2008 3:58 PM
You may need to use the function SAVE_TEXT to create the text object.
01-17-2008 4:22 PM
That would be a great work around but I'd be very suprised if it wasn't handled in the SD_SALESDOCUMENT_CREATE FM?
Thanks for the help though
01-18-2008 11:19 AM
I figured out how to do the item text. If you pass through the sales_text table this will populate the item text. See code below to see how to populate the table. I still need a solution for the ZNET issue.
sales_texts TYPE TABLE OF bapisdtext WITH HEADER LINE,
Fill Header Text data
sales_texts-itm_number = '000010'.
sales_texts-text_id = '0002'.
sales_texts-langu = sy-langu.
sales_texts-format_col = '*'.
sales_texts-text_line = t_citab-ittxt.
APPEND sales_texts.
CLEAR sales_texts.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
SALESDOCUMENT =
sales_header_in = sales_header_in
SALES_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE = ' '
INT_NUMBER_ASSIGNMENT = ' '
BEHAVE_WHEN_ERROR = ' '
LOGIC_SWITCH = ' '
business_object = 'BUS2094' "cred. mem. req.
TESTRUN =
CONVERT_PARVW_AUART = ' '
status_buffer_refresh = 'X'
IMPORTING
salesdocument_ex = salesdocument_ex
SALES_HEADER_OUT =
SALES_HEADER_STATUS =
TABLES
return = returns
sales_items_in = sales_items_in
SALES_ITEMS_INX =
sales_partners = sales_partners
SALES_SCHEDULES_IN =
SALES_SCHEDULES_INX =
sales_conditions_in = sales_conditions_in
SALES_CONDITIONS_INX =
SALES_CFGS_REF =
SALES_CFGS_INST =
SALES_CFGS_PART_OF =
SALES_CFGS_VALUE =
SALES_CFGS_BLOB =
SALES_CFGS_VK =
SALES_CFGS_REFINST =
SALES_CCARD =
sales_text = sales_texts
SALES_KEYS =
SALES_CONTRACT_IN =
SALES_CONTRACT_INX =
EXTENSIONIN =
PARTNERADDRESSES =
SALES_SCHED_CONF_IN =
ITEMS_EX =
SCHEDULE_EX =
BUSINESS_EX =
incomplete_log = incomplete_logs
EXTENSIONEX =
CONDITIONS_EX =
PARTNERS_EX =
TEXTHEADERS_EX =
TEXTLINES_EX =
BATCH_CHARC =
.
01-18-2008 3:25 PM
To populate the ZNET pricing condtions's condition value you must specify the currency_2 field. Easy as that.