2008 Jan 19 8:27 AM
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
2008 Jan 19 11:00 AM
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
2008 Jan 21 4:48 AM
2008 Jan 21 4:22 PM
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.