‎2011 Jun 20 3:42 PM
Hi All,
I need to call a report with variant and abstract the data back to my current program.
so far,
i use following method
SUBMIT RFITEMAR USING SELECTION-SET 'XXX'
EXPORTING LIST TO MEMORY
AND RETURN.
DATA list_tab TYPE TABLE OF abaplist.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
DATA: L_ABAPLIST LIKE ABAPLIST OCCURS 0.
DATA: BEGIN OF L_ASCITAB OCCURS 0,
LINE(2048),
END OF L_ASCITAB.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
TABLES
LISTASCI = L_ASCITAB
LISTOBJECT = list_tab
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.However, the problem is that i need to get some value from variant 'XXX' and keep changing it.
I have try function module "RS_VARIANT_VALUES_TECH_DATA" to get the variant details.
But, it just doesn't get me back all the details of the variants.
Are there any way i could read the variants in detail? i even try to read LRAW data from table vari. but there are no function module to convert the LRAW to either char or STRING.
Thanks.
Edited by: simplekx on Jun 20, 2011 4:43 PM
‎2011 Jun 20 8:02 PM
Try function "RS_VARIANT_CONTENTS", it returns all details and parameters from the variants.
‎2011 Jun 20 8:08 PM
You can use the FM "RS_CHANGE_CREATED_VARIANT" to change the variant values for already created variant and the FM "RS_VARIANT_CONTENTS" to get the variant values. Instead of changing the variant values and then passing to the Submit, you can directly pass the values to the Submit through..WITH SELECTION-TABLE seltab or ... WITH p IN sel variant of the Submit.