Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to include order reason, texts and conditions in the Function SD_SALESD

Former Member
0 Kudos

Hi,

Can some one please help me to include these in the Function SD_SALESDOCUMENT_CREATE.

Sales - order reason - VBAK-AUGRU

Header - texts - From soldto text

Header - Financial Accounting - Reference num - vbak-xblnr

Item - conditions - 'ZCPP' - Price - KOMV-KBETR

Thanks,

Neelu.

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Neelu

> Sales - order reason - VBAK-AUGRU

<b>SALES_HEADER_IN-ORD_REASON</b>

> Header - texts - From soldto text

> Header - Financial Accounting - Reference num -

> vbak-xblnr

<b>SALES_HEADER_IN-REF_DOC_L (16 char)

SALES_HEADER_IN-REF_DOC_L_LONG (35 char)</b>

> Item - conditions - 'ZCPP' - Price - KOMV-KBETR

<b>SALES_CONDITIONS_IN-COND_VALUE </b>

Regards

Uwe

12 REPLIES 12

Former Member
0 Kudos

Hi,

Can anyone please help me.

Thanks,

Neelu.

uwe_schieferstein
Active Contributor
0 Kudos

Hello Neelu

> Sales - order reason - VBAK-AUGRU

<b>SALES_HEADER_IN-ORD_REASON</b>

> Header - texts - From soldto text

> Header - Financial Accounting - Reference num -

> vbak-xblnr

<b>SALES_HEADER_IN-REF_DOC_L (16 char)

SALES_HEADER_IN-REF_DOC_L_LONG (35 char)</b>

> Item - conditions - 'ZCPP' - Price - KOMV-KBETR

<b>SALES_CONDITIONS_IN-COND_VALUE </b>

Regards

Uwe

0 Kudos

Hi,

I got Sales - order reason. Thank you Uwe.

Can someone please help me how to get the remaining.

1) Header - texts -> From soldto text

2) Header - Financial Accounting - Reference num -> vbak-xblnr

I tried SALES_HEADER_IN-REF_DOC, but it is not comming.

3) Item - conditions - 'ZCPP' - Price - KOMV-KBETR

I gave as SALES_CONDITIONS_IN-COND_TYPE = 'ZCPP'

where should I mention condition price.

Thanks,

Neelu.

0 Kudos

Can any one please help me.

Thanks,

Neelu.

0 Kudos

Hi,

I figured out by searching the forum I can use function Save_Text. But I was not clear what to pass. Where should I pass the created CMnumber immediately and create headr text for that.

Why SD_SALESDOCUMENT_CREATE table sales_text is not working for me.

Please guide me.

Thanks,

Neelu.

0 Kudos

What are you passing to the ITM_NUMBER of the SALES_TEXT table? For header texts, it should be '000000'.

0 Kudos

Hi Srinivas,

I was passing '000010', I will try '000000' and let you know.

Thanks,

Neelu.

0 Kudos

Hi Srinivas,

No luck. Text is not comming. This is how I did, Am I missing anything.

Where can I include Text Type. I want the text 'SA-07-003'(Cust PO num) to come for text type ' From Sold-to Text'.

Thanks,

Neelu.

DATA: order_text LIKE bapisdtext OCCURS 0 WITH HEADER LINE.

*Texts

order_text-itm_number = '000000'.

order_text-text_line = 'Price Protection'.

FORM call_function.

CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'

EXPORTING

  • SALESDOCUMENT =

sales_header_in = header

sales_header_inx = headerx

IMPORTING

salesdocument_ex = salesdocument

  • SALES_HEADER_OUT =

TABLES

return = return1

sales_items_in = item

sales_items_inx = itemx

sales_partners = partner

sales_schedules_in = lt_schedules_in

sales_schedules_inx = lt_schedules_inx

sales_conditions_in = conditions1

sales_text = order_text

.

ENDFORM. " call_function

0 Kudos

Associated with your text type ' From Sold-to Text', there will be a ID, that is what you have to pass on to TEXT_ID. Also set the LANGU to SY-LANGU. If you don't know what this ID is, go to your document in change mode and double click on the text area for this text. That will open the long text entry screen. In the menu, GoTo-->Header will bring up a opoup window in which you will be able to see all the details.

0 Kudos

Hi Srinivas,

I added it, but still it is not comming. Am I missing anything or should I check any config.

order_text-itm_number = '000000'.

order_text-TEXT_ID = '0001'.

order_text-LANGU = SY-LANGU.

order_text-text_line = 'Price Protection'.

Please help me.

Thanks,

Neelu.

0 Kudos

Did you APPEND?

0 Kudos

Hi Srinivas,

I did Append now and got the Text.

Thank you very much.

Regards,

Neelu.