2013 Nov 14 10:39 AM
Hi All,
i need to create a report to track all the variants all the objects.
Means in the selection screen if the user giving the report name , need to display all the variant details with content.This thing i know.
table VARID to get the variant name
FM RS_VARIANT_CONTENTS to get the variant content details
Now i want similarly for Function modules as well.
Please help me to track where the variant details of FM gets stored and with content.
I think only for FM and report will have variant concept.If not please let me know for what and all other objects can have the variant and how to track this.
Please help me out in this.
Thanks in Advance.
Karthik.S
2013 Nov 29 9:28 AM
Hi Team,
i have one doubt, See i have a variant for a program.The same variant i am changing and saving under same variant name.So now i want to track.Who changed the old data in the same variant and what he has changed.I need user details as well as old data and new data.
Please help me out to trace this.
Thanks,
Karthik.S
2013 Nov 14 11:35 AM
Hi,
You can check this function module. /OSP/REPORT_GET_VARIANT_DETAIL
call function '/OSP/REPORT_GET_VARIANT_DETAIL'
exporting
iv_report_name = report
iv_variant = variant_name
iv_sapid = sapid
importing
et_return = et_return
et_valuetab = lt_valuetab.
Thanks,
Kiran
2013 Nov 14 11:57 AM
Hi Kiran,
thanks for the reply.
But see i want to know
for the Function Modules's where the test data directory content is getting stored??
2013 Nov 14 12:03 PM
did you try with above mentioned statement..table for function module variant is EUFUNC
2013 Nov 14 11:53 AM
I just debugged for function module and this is how SAP fetches it. table highlighted in bold will have variant detail
Check include LSEUJFDB form DB_IMPORT_DATADIR
d102n_exportkey-area = p_file. ---------------------> FM name
d102n_exportkey-progid = p_fname.----------------> Pass FM name
d102n_exportkey-dataid = dataid. --------------------> 999
IF dir_flag IS INITIAL.
CATCH SYSTEM-EXCEPTIONS conne_import_wrong_comp_type = 1.
IMPORT te_datadir
fdesc_copy
struc_info_table_copy
g_no_save TO l_no_save
d102_fname FROM DATABASE eufunc(fl) ID d102n_exportkey.
2013 Nov 14 12:11 PM
Hi nabheet,
See i want to see and fetch all variant list and the content from some table. by passing the function module name.
How do i do?? any idea??
Please let me know.
2013 Nov 14 12:13 PM
If you use the above mention code in your program or check table EUFUNC it will give you the list of variants for a particular function module. Do one thing put a break point at the statement mentioned above and goto Se37 execute any FM and choose variant you will see how SAP standard is doing it.
2013 Nov 14 12:24 PM
See, i have checked the table EUFUNC. from that i got the variant details.Now based on the data record no i need to get the content of each variant.
See in that standard program its first exporting and then importing.let me explore more on that too.
Thank you..
2013 Nov 14 12:55 PM
Hi All,
i want to know where in which table exactly the test data content(Data's) of each test data for a function module.
please help me to find this.
2013 Nov 14 1:11 PM
SAP is using SFCS_FA_PARAMETER_GET to get individual parameter values. Basically if you check for each function module a program is generated in the background by concatenating function module name and "=FT". this is where it reads data from cluster tables for test data.
You will have to do more research on this..
2013 Nov 14 1:11 PM
2013 Nov 14 2:10 PM
2013 Nov 19 8:39 AM
One more doubt,
can we use import directly with out export statement???
See below is my coding.
select single * from tfdir where funcname = l_fmname.
call function 'FUNCTION_INCLUDE_SPLIT'
exporting
program = tfdir-pname
importing
namespace = t_rs38l-namespace
group = t_rs38l-str_area
exceptions
others = 6.
if sy-subrc ne 0.
message s110(fl) with l_fmname.
leave.
endif.
concatenate t_rs38l-namespace t_rs38l-str_area into t_rs38l-area.
t_testprog = l_fmname.
translate t_testprog using ' ='.
t_testprog+30 = 'FT'.
t_d102n_exportkey-area = t_rs38l-area.
t_d102n_exportkey-progid = l_fmname.
t_d102n_exportkey-dataid = '999'.
catch system-exceptions conne_import_wrong_comp_type = 1.
import t_datadir
t_fdesc_copy
struc_info_table_copy
l_no_save to l_no_saveto
d102_fname from database eufunc(fl) id t_d102n_exportkey.
i tried this way as well
CATCH SYSTEM-EXCEPTIONS conne_import_wrong_comp_type = 1.
IMPORT t_datadir
FROM DATABASE eufunc(fl) ID d102n_exportkey.
ENDCATCH.
But i am not getting the records in the table t_datadir.
Please help me out so solve this.
The step is executing with out any error but no records..
The requirement is that i need to fetch the test data in human readable form (not in the form of cluster directly as from enfunc).
Thanks,
Karthik.S
2013 Nov 19 8:49 AM
2013 Nov 19 9:12 AM
2013 Nov 19 9:29 AM
Hi Karthik
I have checked the below mentioned code. Its returning me the detail of test variants. Test data also checking
DATA: l_no_save TYPE c.
DATA : BEGIN OF te_datadir OCCURS 10,
dataid LIKE eufunc-nummer, "Schlüsselnr. für Testdatenimp.
stepid(3), "PBO/PAI-Eintrag
seqid LIKE eufunc-seqid,
datum LIKE sy-datum,
uzeit LIKE sy-uzeit,
title(40),
END OF te_datadir.
TYPE-POOLS: suni, nf2ty, setst, swbse, seoc.
DATA: struc_info_table_entry TYPE nf2ty_struc_info_table_entry,
struc_info_table TYPE nf2ty_struc_info_table,
struc_info_table_copy TYPE nf2ty_struc_info_table.
DATA : BEGIN OF fdesc OCCURS 10,
name(30), "Feldname
table(40), "Tabellenname
type(1), "Datentyp
length(5), "Länge
ilength(5), "Eingabelänge
hlength TYPE p, "Eingabelänge
ftype(3), "Typ fdt_...
"I IMPORT
"E EXPORT
"C CHANGING
"S STRUCTURE
"Y TYPE
"T TABLE
number TYPE i, "Referenz, wessen Struktur
END OF fdesc.
DATA: BEGIN OF fdesc_copy OCCURS 10,
line LIKE fdesc,
END OF fdesc_copy.
DATA: d102_fname LIKE rs38l-name.
REFRESH te_datadir.
REFRESH fdesc_copy.
CLEAR struc_info_table_copy.
CLEAR d102_fname.
DATA : d102n_exportkey LIKE functdir.
CLEAR d102n_exportkey.
d102n_exportkey-area = 'SPO1'. "-- Function Group --"
d102n_exportkey-progid = 'POPUP_TO_CONFIRM'. "-- Function Module --"
d102n_exportkey-dataid = '999'.
CATCH SYSTEM-EXCEPTIONS conne_import_wrong_comp_type = 1.
IMPORT te_datadir
fdesc_copy
struc_info_table_copy
g_no_save TO l_no_save
d102_fname FROM DATABASE eufunc(fl) ID d102n_exportkey.
ENDCATCH.
BREAK-POINT.
2013 Nov 19 11:04 AM
Yes its working...
Now i need the content of the test data he has selected....
Thanks in advance...
2013 Nov 19 8:49 AM
2013 Nov 29 9:28 AM
Hi Team,
i have one doubt, See i have a variant for a program.The same variant i am changing and saving under same variant name.So now i want to track.Who changed the old data in the same variant and what he has changed.I need user details as well as old data and new data.
Please help me out to trace this.
Thanks,
Karthik.S
2013 Nov 29 11:38 AM
2013 Nov 29 11:50 AM
Hi,
Currently I am checking your issue, However,please find the FM to get the report details of variant RS_VARIANT_INFO
Thanks,
Kiran
2013 Nov 29 11:57 AM
Hi Karthik-
Check below tables which may help you:
VARI - Will store different versions.
VARIT - For Variant Texts
VARID - Variant Directory
-Venkat
2013 Nov 29 12:23 PM
Hi Venkat,
in VARI table we have field called CLUSTD where we have content of the table.But its of type RAW.
So how can i convert so that we can see the data in understandable format.
Please help me out.
2013 Nov 29 12:59 PM
Hi,
Same like is there any way to trace the test data changes for FUNCTION Module.
I want who created test data , if some one modified the same ,, i need those info and old data + new modified data.
I need all modification history details for a test data of a Function Module.
Help required.
2013 Nov 29 1:22 PM
Hi Karthik,
I have tried my best but unable to found the history table or FM to store the change log of report variants. In fact all variant tables are start with VAR* only.
I have checked the some reports and no use of it.
| RSADJUSTVARITABLES | Reconcile VARIT, VARID, VARI, and VARIS |
| RSDBSPVD | RSDBRUNT Help: Variants and Dynamic Selections |
VARID: You will get the only latest details of the variant changes.
I guess no history table available to track the changes. better to think other alternate.
Thanks,
Kiran
2013 Nov 29 2:03 PM
2013 Dec 02 5:22 AM
Hi Karthik
Can you please summarize what all is pending and you are looking for?
Nabheet
2013 Dec 02 5:51 AM
Hi Nabheet.
Pending Requirement,
1) Need to fetch all the changes happened to a variant of a report program.
Ex. Var1 is a variant for a report and its created by me yesterday. Today i have modified , and today evening some one else modified the same variant VAR1 again.
So i want to trace what modification he has done??
means User delails + date + time + old value + new value.
Now i am getting who created, who last modified and the latest variant values.
2)Need to fetch all the changes happened to a Test Data of a FM.
Same like above.
need to fetch all the details like user name those who has created and who has changed+date+time+old value+new value
But as of now for FM's i am not able to fetch anything..not even the User name who created it.
i am getting the test data list as per the code u suggested,But actually that is not the requirement.
2013 Dec 02 6:07 AM
Hi Karthik,
You can track the changes in case of FM variants by using the table EUFUNC. The table will have the field called NUMMER to get the history log.
I am not getting such type of instance for report variants.
Thanks,
Kiran
2013 Dec 02 6:25 AM
Hi Karthik
You will have to take one step at a time.
Function module
RS_TESTDATA_GET eturns you the author, creation date and time details etc.
RS_TESTDATA_DIRECTORY_GET return all test data varaints
SFCS_FA_PARAMETERS_GET_TABLE-- For each test data found in above FM use this FM(or a zcopy as per your need) CONTAINER will return you the parameter and its values.
Nabheet
2013 Dec 03 5:55 AM
Hi Nabheet,
i tried the FM RS_TESTDATA_GET , here i am passing the function module name and group but its not returning the author, creation date and time details etc.
Please check this out .
Karthik.S
2013 Dec 03 6:02 AM