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

Reading Inaccessible Data In User Exit

Former Member
0 Likes
719

Dear All,

I have one user exit. In that user exit data entered in table control provided at TRIP transaction is not avialable as import parameter.How do read that.

As I remember there is some function module which helps us to achive this functionality but I am not sure . Please give your Input.

Raghavendra

Dear All,

I have one user exit. In that user exit data entered in table control provided at TRIP transaction is not avialable as import parameter.How do read that.

As I remember there is some function module which helps us to achive this functionality but I am not sure . Please give your Input.

Raghavendra

3 REPLIES 3
Read only

George_Lioumis
Active Participant
0 Likes
666

Hi.

Try to do the following:

SAPMP56T is the main program of transaction TRIP. Somewhere there, an internal table is defined for the table control that you mention. If that table is named for example i_trip, you could possibly access its data within the user exit as follows:

DATA: wl_main(30) TYPE c VALUE '(SAPMP56T)I_TRIP[]'.

FIELD-SYMBOLS: <fs> TYPE ANY TABLE.

data: begin of loc_trip,

.....as i_trip[] ......

end of loc_trip.

DATA: wa_trip like loc_trip. "define athe exact structure in the user exit

ASSIGN (wl_main) TO <fs>.

IF <fs> IS ASSIGNED.

LOOP AT <fs> INTO wa_trip.

......your data must be here!

ENDLOOP.

ENDIF.

The respective code was tested within a user exit of VA01 (SAPMV45A main program and MV45AFZZ user-exit)

Reward please if it helps

Regards,

George

Read only

Former Member
0 Likes
666

Dear All,

My Problem is yet not solved

Rgahavendra

Read only

0 Likes
666

l_memory_area(30)

TYPE c VALUE '(SAPLIEL2)WORK_UNT[]',

FIELD-SYMBOLS:

<fs_table> TYPE table,

<fs_line> TYPE ANY.

  • Assign the internal table that contains the data your want to get at This table exists in memory of the calling program of this exit. See my example, I get the internal table call WORK_UNT[] from the program SAPLIEL2

ASSIGN (l_memory_area) TO <fs_table>.

IF sy-subrc <> 0.

EXIT.

ENDIF.

CREATE DATA l_new_line LIKE LINE OF <fs_table>.

ASSIGN l_new_line->* TO <fs_line>.

  • Read your data here

LOOP AT <fs_table> INTO <fs_line>.

ASSIGN COMPONENT '<your data you want>' OF STRUCTURE <fs_line>

TO <fs_?>.

ENDLOOP.

ENDIF.