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: 

Need table data to be captured in a field symbol.

Former Member
0 Kudos

Hi,

I need to capture the Table data of a program(SAPLSTXD) into a filed symbol which is called in different program i.e. BTE.

I have written code like below....but does not work.

Data: lines type table of tline,

c_prog type string value '(SAPLSTXD)lines[]'.

field-symbols: <fa> type any table.

assign (c_prog) to <fa>.

if <fa> is assigned.

lines[] = <fa>.

endif.

Please suggest if I am doing wrong. I am not getting data in <fa>. Error says that field symbol is not assigned.

Thanks in advance.

10 REPLIES 10

edgar_almonte
Participant
0 Kudos

i think you got wrong in everything , you can pass data beteween program in sap , you need check if the program make some data upload to memory something like : import catalog from memory id 'SAPLSTXD'.

then you need do the same in you code

0 Kudos

Hi,

Inside the program actually it is exporting the table to a memory id but for some reason it is not returning when I import form the same memory id in my program.

So I think we have to do it from field symbol only.

Thanks

0 Kudos

not sure what happen but remember you that import export only work in the same session afaik.

check the doc for more inside about the subject

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bde358411d1829f0000e829fbfe/frameset.htm

Former Member
0 Kudos

Hi

Try keeping all the characters in the variable c_prog to upper case and keep the space between [ ].

i.e.

data : c_prog type string value '(SAPLSTXD)LINES[ ]'.

~~~Ganesh Kumar K.

Clemenss
Active Contributor
0 Kudos

Hi Faiyaz Ahmed,

note that the dynamic assign only works for global data of a program loaded.

Please explain what you really want to do, what is the code, how do you know the SAPLSTX program is loaded and how do you interfere here.

You cannot expect a solution when you hide all details.

Regards,

Clemens

Former Member
0 Kudos

Hi,

I have to write the Item text of a PO to application server.

And the Text of that item is not saved to PO before my code is executed i.e. in BTE.

So I wanted to capture the item text in my BTE and write it to appl server.

for this I am using field symbol.....here in SAPLSTXD there is a include LSTXDU08 which is nothing but FM: SAVE_TEXT.

This FM has an export table LINES which has that item text value.

I have to export or fetch this table value into my program.

Thanks

Clemenss
Active Contributor
0 Kudos

Hi Faiyaz Ahmed,

thank you, this is much more clear.

Although I don't know where the BTE ist raised and processed, you can make use of BADI ME_PROCESS_PO_CUST. Implement this bADi; Method PROCESS_ITEM imports the IM_ITEM object. Use methods IF_LONGTEXTS_MMGET_TYPES to determine the text object id name and then IF_LONGTEXTS_MMget_text to read the item texts.

Probably you can store a reference to IM_ITEM to a container object and use this in the BTE event.

Regards,

Clemens

Former Member
0 Kudos

Hi Clemens,

Thanks for that. I see Badi ME_PROCESS_PO_CUST and its method PROCESS_ITEM AND also parameter IM_ITEM.

But I dint get where is methods IF_LONGTEXTS_MMGET_TYPES and IF_LONGTEXTS_MMget_text.

Please clarify...

Thanks,

Faiyaz

Former Member
0 Kudos

Hi Faiyaz,

I noticed that 'IF_LONGTEXTS_MMGET_TYPES ' and 'IF_LONGTEXTS_MMGET_TEXT ' methods exist in another class 'CL_PO_HEADER_HANDLE_MM'.

Please check this link: [http://wiki.sdn.sap.com/wiki/display/ABAP/PurchaseOrderDataExtractionusingABAPClasses]

Also, check following includes as how above methods are being used.

L2012F27

Hope Clemens suggestion works out for you.

Good luck.

Regards,

Vivek

Clemenss
Active Contributor
0 Kudos

Hi Faiyaz Ahmed,

just a clarification related to your original question: As already said, dynamic assign works with global data of the respective program. LINES is an import parameter of function module SAVE_TEXT. The interface is not globalized, so LINES is not available.

So what ever you tried here, you just can not access any part of the function modules interface. You might have tried any global variable that is defined in include LSTXTOP - but the Badi way will be better.

Regards,

Clemens