cancel
Showing results for 
Search instead for 
Did you mean: 

how to get sales order header text in web dynpro

former_member209118
Participant
0 Kudos

Hi,

How to display sales order Header text along with sales order details when sales order number is entered in web dynpro ABAP.

Thanks,

Ashok.

Accepted Solutions (1)

Accepted Solutions (1)

former_member196157
Active Participant
0 Kudos

HIII,

Use READ_TEXT FM

FOR that double click on text

Following screen display

now in menu  goto--->header    the parameters for the READ_TEXT are displayed

now the code is as

data: v_lines1 like tline occurs 0 with header line.
data: v_name1   like stxh-tdname,
tdspras1  like stxh-tdspras,
tdid1     like stxh-tdid,
tdobject1 like stxh-tdobject.
tdobject1 = 'VBBK'.
tdid1     = '0001'.
tdspras1  = 'EN'.
v_name1   = h_inv-exnum. """ Sales order number
call function 'READ_TEXT'
exporting
   id                            tdid1
   language                      tdspras1
   name                          v_name1
   object                        tdobject1
   tables
   lines                         v_lines1
exceptions
   id                            = 1
   language                      = 2
   name                          = 3
   not_found                     = 4
   object                        = 5
   reference_check               = 6
   wrong_access_to_archive       = 7
   others                        = 8.

loop at v_lines1.
   concatenate g_trans v_lines1-tdline into g_trans separated by space.
   condense g_trans .
endloop.




this may helps u..........

former_member209118
Participant
0 Kudos

I tried but it's not working....

Thanks,

Ashok.

former_member196157
Active Participant
0 Kudos

hiiii,

what is problem now,

is there any error

former_member209118
Participant
0 Kudos


v_name1   = h_inv-exnum.


Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Ashok,

Please check STXH table using TDOBJECT = 'VBBK' and TDNAME = 'your order number'. See if you have any entries stored in there.

Sometimes the user enter the text in different language and then you try to retrieve in other language where the READ_TEXT wouldn't fetch you any entries.

Check in STXH table using TDOBJECT and TDNAME, then if you have data in that table, use READ_TEXT by exporting  TDID and TDSPRAS also as per the values in STXH table.

Thank You,

Gajendra.

former_member196157
Active Participant
0 Kudos

hiii,

pass the sales order number

for example

v_name1 = '0000120'.

former_member209118
Participant
0 Kudos

what is g_trans?

former_member196157
Active Participant
0 Kudos

hiii,

g_trans is string type variable where u get the final sales order text

i.e.  data: g_trans type string.

OR

       data:g_trans type CHAR100.

Harsh_Bansal
Contributor
0 Kudos

Hi Ashok,

Create an textview element on the side of sales order number input field. Bind an attribute from context to the value of the textview element.

Now you can create an Action OnEnter for Saled Order Number Input Field. Then in the Event Handler method for this action, sales order text can be fetched and filled in the context attribute which we bound with the Textview element.

Regards,

Harsh Bansal

former_member209118
Participant
0 Kudos

hi Harsha,

thanks for your reply.I try to call function module 'READ_TEXT' in there, but I don't know which what parameters, do I need to pass over there to get sales order text.

I tried these parameters

exporting

id = '0001'

object = 'VBBK'

name = '0000005405'

but still its not working.

Harsh_Bansal
Contributor
0 Kudos

Hi Ashok,

Just confirm once the Text ID by following the steps mentioned by Mahadeo.

Regards,

Harsh Bansal

Former Member
0 Kudos

You need to create a UI for this, then some FM to get the output form the SD tables and then Assistance class to call FM and finally node to show data on UI.

former_member209118
Participant
0 Kudos

Hi Chandra,

Thanks for your reply. By using READ_TEXT F.M we get text data, but my question is what parameters do I need to pass?

like object,id name table

Thanks,

Ashok.

Former Member
0 Kudos

Check the following link for the same.. it may help you..

READ_TEXT (SAP Library - BC SAPscript: Printing with Forms)