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: 

Notes Text from sales order data

Former Member
0 Kudos
2,157

Hy All experts.

I wnt to put Notes into sales roder report. i type notes in va02. item line, texts. but it's field value define like structure. LV70T-TDID. so hw to put it by in my report. or via Selec statement.

please see foll select statement used in my ALV reports.

FORM data_retrieval.
SELECT VBELN  NETWR KUNNR FROM VBAK INTO (ITAB-VBELN,ITAB-NETWR,ITAB-KUNNR) WHERE VBELN IN VBELN .
SELECT NAME1 FROM KNA1 INTO (ITAB-NAME1) WHERE KUNNR = ITAB-KUNNR .
SELECT BSTKD BSTDK FROM VBKD INTO (ITAB-BSTKD,ITAB-BSTDK) WHERE VBELN = ITAB-VBELN.
SELECT VSNMR_V FROM VBAK INTO (ITAB-VSNMR_V) WHERE VBELN = ITAB-VBELN.
SELECT LFGSA FROM VBUP INTO (ITAB-LFGSA) WHERE VBELN = ITAB-VBELN and LFGSA ne 'C'.
*SELECT LFSTK FROM VBUK INTO ITAB-LFSTK WHERE VBELN = ITAB-VBELN and lfstk ne 'C'.
SELECT LFSTK FROM VBUK INTO ITAB-LFSTK WHERE VBELN = ITAB-VBELN and lfstk ne 'C'.

4 REPLIES 4

Former Member
0 Kudos
340

Hi,

Try to find the entered notes texts are stored which table or try with the function module READ_TEXT this will solve your probs.

Regards

Thirupathy

0 Kudos
340

Thnks for Reply.

but i done it with function module. u can give me guide hw to fetch form function modules.

thnks

Bhavesh

Former Member
0 Kudos
340

Hi Bhavesh Panchal,

using the FM: READ_TEXT you will get the details text.

u pass the below

Name : sale order no.

Language EN

Text ID 0001 Form Header

Text Object VBBK Sales Header texts

u will get Lines of the text.

loop the lines and u will get the text entered in sale order.

regards,

ravibabu.a

Former Member
0 Kudos
340

Hi,

First you should know the details like Tex id, name, text object to read the text entered in item line.

In VA02 for the sales document select the item and go to texts tab.Double click on item text and again double click on text editior. You will get next screen as script editor. Then goto Goto--->Header. Here you can find the details and you can pass these details in FM READ_TEXT.

See the following code:


  call function 'READ_TEXT'
    exporting
      id        = l_txtid
      language  = l_txt
      name      = l_txtkey
      object    = l_txtobject
    tables
      lines     = lt_text
    exceptions
      id        = 1
      language  = 2
      name      = 3
      not_found = 4
      others    = 8.
  check sy-subrc eq 0.
  loop at lt_text into ls_text.
    if gs_vor-text ne ls_text-tdline.
      write: / ls_text-tdline under gs_vor-text.
    endif.
  endloop.

Regards,

Raju.