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

How to find program name from session name ?

Former Member
0 Likes
2,629

Hi all,

We are converting the session names in production system as it is open to all and we are going to restrict it to users .So we have to convert the name of the session .This is our need.

For that we are preparing one excel sheet with the new session which we are going to rename and for renaming we need the program name .

Only I am having the session name in SM35 .with that I have to find the prgm name from which the session is created.

There will be a creation prgm in sm35 but it will not be the orginal prgm from which the session is created. Sometimes it will be the same prgm which created the session.

If we run one ‘Z’ prgm for eg, I am running ZFCBSINT , it will submit to some other prgm and it will create the session with the created prgm name RFBIBL01. Now I want the first prgm name …

Any way to get the original program name say ZFCBSINT in our case ?

Regards,

Kavitha

Hi all,

We are converting the session names in production system as it is open to all and we are going to restrict it to users .So we have to convert the name of the session .This is our need.

For that we are preparing one excel sheet with the new session which we are going to rename and for renaming we need the program name .

Only I am having the session name in SM35 .with that I have to find the prgm name from which the session is created.

There will be a creation prgm in sm35 but it will not be the orginal prgm from which the session is created. Sometimes it will be the same prgm which created the session.

If we run one ‘Z’ prgm for eg, I am running ZFCBSINT , it will submit to some other prgm and it will create the session with the created prgm name RFBIBL01. Now I want the first prgm name …

Any way to get the original program name say ZFCBSINT in our case ?

Regards,

Kavitha

6 REPLIES 6
Read only

Former Member
0 Likes
1,446

Hi,

Check in Table APQI & D0300, you may find the link between the session name & the program created the session.

If this helps please close the question by giving reward points.

Rgds,

Read only

Former Member
0 Likes
1,446

The problem is not resolved . I couldn't get the original program name from the above table.

Read only

0 Likes
1,446

Hi,

Can you please elaborate on your requirement, I am able to get the original program name using the table APQI.

For ex. if you use a program ZBDC ( Which has an include bdcrecx1 )and create the session by name Rose after executing you will find an entry in table APQI, the field for session name is Groupid & the field for program name is progid, get back for further clarifications.

Rgds,

Read only

0 Likes
1,446

Hi Kavitha,

I have never thought about this before, but your question has been quite clear. Especially your example part.

Now consider this a little more clearly...There's a Z-program of yours (let's call it Program A) from which you are calling another program (may or may not be a standard program). Let us call this one Program B. When you SUMBIT program B from A, then inside program B can you find out the name of the program A? The answer is No! (sy-cprog does not work in this case).

So even if you are not preparing the batch input session in program B, there's no way of keeping track of the name of the Program A automatically.

But if program B is a Z-Program, then you can write the code in it to fetch the name of program A using the memory IDs. but if it is a standard program that you are submitting, then you will not have this option.

So the best thing is to keep a track of this yourself, for example in some Z-table.

I cannot think of anything more elegant for now. Let us see if some one has got a better idea.

Regards,

Anand Mandalika.

Read only

krzysztof_konitz4
Contributor
0 Likes
1,446

Hi,

If this concern only your Z* programs you can modify them and store association of session names with programs in custom db table.

Krzys

Read only

Former Member
0 Likes
1,446

Hey have u find out to backtrack the program's name from the BDC's session?

I was trying to get the program's name but unable to find one. Looked into APQI table too. Also, looked into TBTCP table but of no use. Can u suggest smthing?