Application Development and Automation 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: 
Read only

Displaying order text in smartforms

Former Member
0 Likes
3,580

Hi,

I have designed a smartform where I need to print (using Read Text FM)  sales order header text with text ID 0001selecting from VBFA.

Can anyone please help on the logic to fetch it and the steps.

Thanks in advance

Regards,

Tina

Hi,

I have designed a smartform where I need to print (using Read Text FM)  sales order header text with text ID 0001selecting from VBFA.

Can anyone please help on the logic to fetch it and the steps.

Thanks in advance

Regards,

Tina

17 REPLIES 17
Read only

Former Member
0 Likes
2,685

Are you saying that you don't know what parameters to feed to read_text?

Neal

Read only

Former Member
0 Likes
2,685

No i mean I am not too sure about the logic to fetch the sales order header  text VBBK from VBFA

Tina

Read only

0 Likes
2,685

So, which document type do you have in VBFA?

Neal

Read only

0 Likes
2,685

Use include text to display text ..

Go to VA02 and go to the text in question, go into the long text mode and then in the menu 'GoTo-->Header' option will give you how it is stored in the database. Just pass the NAME, OBJECT, and ID and language.

Read only

0 Likes
2,685

So lets say that you have an invoice and your invoice was created from delivery and your delivery was created from SO.  In VBFA with your invoice,  you'd have to find the predecessor document that was a delivery.  Then once again from VBFA with the found delivery document, you'd have to find the predecessor document that was of type sales order document.

Is that what you wanted?

Neal

Read only

Former Member
0 Likes
2,685

its a credit debit memo (YSDN)

Read only

0 Likes
2,685

why you want to go to VBFA table its document flow table ..just use read_text with following parameters

OBJECT      VBBK

NAME        0000255562 here name is your sales order number

ID          0012

SPRAS       EN

i am not sure what you wanted to achieve by going to VBFA for sales order header text.

Read only

0 Likes
2,685

I need to get the document number vbelv from vbfa. please help me with dispalying the order text that i ll get through the return parameter of READ_TEXT

Read only

0 Likes
2,685

You mention that you have all the info, if you have order number just call READ_TEXT with the parameters that abhijeet deshpande mentioned.

Read only

Former Member
0 Likes
2,685

You can use the function module below to get the Order flow, it will fetch the vbfa from Sales order.

CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'

         EXPORTING

           comwa              = ls_comwa

         TABLES

           vbfa_tab            = lt_return

        EXCEPTIONS

          no_vbfa             = 1

          no_vbuk_foun    = 2

          OTHERS          = 3.


Regards,

Felipe

Read only

Former Member
0 Likes
2,685

No.. I have all that info. I have the Vbtyp_n = L and vbtyp_v = k. but how do i get the order text? like what does the function module return? and does it return in a table? how do I get the header order text from there?

Tina

Read only

Former Member
0 Likes
2,685

Hi Tina,

Go to t-code VA03 and Enter sales order and then goto=>header=>texts.

Click on the text editor and again go to=>header.

Now you will get all relevant details to sales order data ( NAME, OBJECT, and ID and language).

Just pass it the FM 'Read_Text' .

Hope it will help you..

Read only

Former Member
0 Likes
2,685

Hi Tina,

Could you please clear your exact requirment??

Thanks.

Read only

Former Member
0 Likes
2,685

I wanted to know how to display the order text from the table that the FM returns

Read only

0 Likes
2,685

There is really no practical solution for doing so without the FM.

Neal

Read only

0 Likes
2,685

if you wanted to display in smartforms

when you create simple text  , for that text select text type as 'INCLUDE TEXT' and pass parameters i mentioned

OBJECT      VBBK

NAME        0000255562 here name is your sales order number

ID          0012

SPRAS       EN

here i have hard coded sales order number , get sales order number into a variable and pass to name. and thats it it will display header text on your smartforms.

why dont you try all these things which everyone is suggesting. please make yourself work on all the suggestions mentioned by all experts here.

Read only

Former Member
0 Likes
2,685

Hi Tina,

Please Check table 'STXH' with your sales order header text data ( NAME, OBJECT, and ID and language)

Thanks