Skip to Content
author's profile photo Former Member
Former Member

SD_SALESDOCUMENT_CREATE

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 doesn’t 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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2008 at 03:58 PM

    You may need to use the function SAVE_TEXT to create the text object.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2008 at 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 =

    .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2008 at 03:25 PM

    To populate the ZNET pricing condtions's condition value you must specify the currency_2 field. Easy as that.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.