04-07-2006 7:34 AM
Hi Guys,
I wud like to have some info on the below mentioned FM.
<b>RS_program_version</b>,which will displays all the versions exist for a program.
<b>i wud like to store these displayed version into an itab??
How can i do this..?</b>can any body suggestme? Your help is appreciated.
Thanks,
Raja.
04-07-2006 7:39 AM
hi raja,
define itab with ref to the corresponding return parameter of this FM and pass this itab to the return parameter.You are done after this..
Cheers,
Abdul hakim
04-07-2006 7:43 AM
Hi Hakim,
cud u please check that particular FM and suggest me a way to accomplish this ( as this FM contain only input parameter)
Raja.
04-07-2006 7:44 AM
hi raja,
i am in 4.6c and im unable locate this in this version.
you jus check the changing,exporting and tables parameters.
Cheers,
Abdul Hakim
04-07-2006 7:51 AM
im also in 4.6c..
sorry i had given wrong FM:
please check it now
<b>RS_PROGRAM_VERSIONS</b> and guide me
04-07-2006 8:08 AM
hi raja,
use the below code to achieve your result..
data itab_version like table of VRSD_OLD.
data itab_list like table of VRSN.
data wa like VRSD_OLD.
CALL FUNCTION 'SVRS_GET_VERSION_DIRECTORY'
EXPORTING
OBJNAME = 'ZMR0011X' "your report name
OBJTYPE = 'REPS' "Report Program
TABLES
LVERSNO_LIST = itab_list
VERSION_LIST = itab_version
EXCEPTIONS
NO_ENTRY = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at itab_version into wa.
write:/ wa-OBJTYPE,
wa-OBJNAME,
wa-VERSNO,
wa-KORRNUM,
wa-AUTHOR,
wa-DATUM,
wa-ZEIT,
wa-LOEKZ,
wa-ORIGIN,
wa-VERSMODE,
wa-LASTVERSNO,
wa-FIRSTVERSN,
wa-RELS,
wa-MANDT,
wa-KEYLEN,
wa-TABLEN.
endloop.
Cheers,
Abdul Hakim
04-07-2006 7:53 AM
You will not be able to capture the version data for a specific program with the specified module, because it in the en displays a screen with write statements.
However you can use another function module: SVRS_GET_VERSION_DIRECTORY that will get you what you want.
There are two input parameters:
1. OBJNAME = Report or program name.
2. OBJTYPE = 'REPS'
Hope that'll do it for you
XX
04-07-2006 7:56 AM
Hi Raja,
this function only displays the information but doesn't return any data you can utilize in an internal table.
Your best shot might be to get this information directly from table VRSD. Use
OBJTYPE = REPS
OBJNAME = <your program name>
If your program has different versions, they will show up here (that's what the function RS_PROGRAM_VERSIONS does as well).
Regards,
Claus
04-07-2006 8:04 AM
Hi Raja,
Try using the FM SVRS_FIND_VRSD_INFO.
else
Get the versions from table VRSD (Version management: Directory table)
Use the following code.
Declare a table:
Data : begin of Itab_VRSD occurs 0,
OBJTYPE type VERSOBJTYP,
OBJNAME type VERSOBJNAM,
VERSNO type VERSNO,
KORRNUM type VERSKORRNO,
end of itab_vrsd.
Select OBJTYPE OBJNAME VERSNO KORRNUM from VRSD into table itab_VRSD where OBJTYPE = 'REPT' (Report program)
OBJNAME = <Program name>.
This will give you all the versions in VERSNO field and
the correspoding request number in KORRNUM field.
Hope it helps...
Lokesh
pls. reward appropriate points