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

Version Management

Former Member
0 Likes
578

Hi

I am using z1 program in the version of 00004.Now i want to activate the version of 00002.That can be done by only through the code not from sapGUI For this i got one code like below and i pasted in z1 program also...

DATA: lv_objname_l LIKE vrsd-objname,

ls_infoline_1_a LIKE vrsinfolna,

ls_infoline_1_b LIKE vrsinfolnb.

SUBMIT (dir_f9_report) AND RETURN

WITH objtype = ls_vers_1-objtype

WITH objname = lv_objname_l

WITH versno = ls_vers_1-versno

WITH infolna = ls_infoline1a

WITH infolnb = ls_infoline1b.

In this i gave the value like

dir_f9_report = z1

objname = z1

versno = 00002

But for objtype,infolna,infolnb what shall i give and also the given values are correct?????

4 REPLIES 4
Read only

Former Member
0 Likes
518

Go to version management and select your 0002 version and click on retrieve.

This will overwrite the active version with the version selected and the it will create a temperory version of the active version which existed.

You dont need to manually copy the previous version.

Regards,

Lalit Mohan Gupta.

Read only

matt
Active Contributor
0 Likes
518

I think you are confused.

SUBMIT 'Program' WITH VERSNO = '00001', does not run version 00001 of 'Program'. It runs 'Program' setting "VERSNO" on 'Program''s selection screen to be '00001'.

matt

Read only

ThomasZloch
Active Contributor
0 Likes
518

seems to be a follow up to

I don't think there is a completely "dark" way of doing this, at least not a straightforward one. The SAP standard determines the program for version retrieval per object type from table VERSOBJ by using function module SVRS_GET_OBJECT_REPORTS, then calls this program, e.g. RSEDTVE1 for object type REPS (report source). RSEDTVE1 however comes up with a pop up like "are you sure you want to do this?". It also contains lots of complex logic that does not seem to be encapsulated anywhere else (have not checked though).

Thomas

Read only

0 Likes
518

Hi Thomas,

Like this the same way what is the FM for Generate version.