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

get objects(?) for program.

Former Member
0 Likes
1,860

Hi Team ABAP,

When i activate a program, or a condition or whatever where coding is involved, a Syntax check is done.

And i get told that e.G. i have called a form routine which isnt present in system, or that some local variable is declared twice.

So the other program that does these checks must have some list of objects which are beeing checked for existance, same interface and so on.

I´d need to use exactly this functionality.

What is my plan?

Well we have a report which checks Transport requests, if they can be transported or we have some overtaker problem or whatever.

To "complete" this tool i would like to check in the destination systems if all objects involved in transport are present.

I mean if i have a program that calls a function module in its coding, i want to check in destination system if the function module is present for the case we dont have it in the same transport request.

If it isnt present i will get a returncode not equal 0 when the imported source is generated. To avoid such i want to check it in advance (BEFORE TRANSPORTING).

It´s just that i dont really have an idea how to get started...

regards

1 ACCEPTED SOLUTION
Read only

GauthamV
Active Contributor
0 Likes
1,799

Use this FM .

RS_CROSSREFERENCE.

You can get lot of information if you debug this FM.

14 REPLIES 14
Read only

GauthamV
Active Contributor
0 Likes
1,800

Use this FM .

RS_CROSSREFERENCE.

You can get lot of information if you debug this FM.

Read only

Former Member
0 Likes
1,799

Hi Florian,

you can use the statement

SCAN ABAP-SOURCE itab1 ...TOKENS INTO itab2

...STATEMENTS INTO itab3.

and get all the tokens in an internal table and also get the statements in another internal table. Then loop through these internal table and check in debugging mode the values of these tables. You will get an idea of how you can get the objects, once you get the objects, call related RFC function module to check if the specified object is present or not....

hope this give you a fine start and makes your life easier

Thanks,

Sid

Read only

gerd_rother
Active Participant
0 Likes
1,799

Hi Florian,

The ABAP SCAN command might help you...

Check the documentation.

Regards, Gerd Rother

Read only

0 Likes
1,799

Ok, thats some stuff i can work with.

Thanks a lot for getting me on track i will now try to get something coded out of this.

I will leave the question open for now since i´m not finished yet and so not totally solved once a solution is done i will come back here and post it for documentation purposes.

Thanks for the answers so far.

Read only

0 Likes
1,799

Hmm i need some additional help on this.

It seems the SCAN statement would do the trick. Problem now: how do i get my report into that itab the scan needs?

If i use statement LOAD REPORT, i must user addition PART which gives me only certain parts of the program.

If i do a Select on table REPOSRC i just get one line in my itab.

Both seems not to be like the type of itab i need to use for the SCAN statement.

anyone any expieriences with this?

Read only

0 Likes
1,799

Hi,

Do that with READ REPORT.

Regards, Gerd Rother

Read only

0 Likes
1,799

yup using the read report statement you can get the source code in an internal table and then use the scan abap-source you will be there...

Read only

0 Likes
1,799

Did you check the source code of FM i suggested earlier ?


    read report PROGNAME into SOURCE
                      maximum width into MAX_LINE_LENGTH.

Read only

0 Likes
1,799

well actually i had a short look into it, but really didnt want to analyse the whole code about what it does. The FM has no documentation so thats kinda the only way to find out what it does and if it matches my requirement in some way.

Sorry for that but beeing honest i spared myself the time to read & understand the whole coding of that FM, since it will take me a while to find out if it can/will help me or not.

But i will recheck that on a later iteration or if i run into problems using the other proposed methods.

And yes DAMN, how could i forget READ REPORT...

seems my brain already started weekend

Read only

0 Likes
1,799

I've got a "little" program that seems to do what you want. The output is rather ugly, but gives the essential functions. I will check it tomorrow, and post it to a wiki. The where used lists are obtained using CROSS and WBCROSSGT tables (much more easy than using SCAN).

Read only

0 Likes
1,799

Just in time: it's less than 24 hours after my post

So, here it is: http://wiki.sdn.sap.com/wiki/display/ABAP/ABAPprogramtosimulatetransports

The result screen is more friendly, with ALVs instead of almost unreadable lists.

Note that the tool cannot do miracles, but it may help a lot if you experience many transport errors, and if your transport procedure takes time and resources.

One of the most useful additions could be to list objects required by transported objects, that are being maintained, so that to detect many potential errors.

Tell me if it corresponds to what you expected, we may work together to enhance it if you want.

Read only

0 Likes
1,799

WOOT!

Thanks Sandra, this helps a lot. So what i really want is exactly that "complex" scenario you describe in your wiki which you have not yet applied to your program.

Somehow out of the blue my tasks on my Desk start to stockpile so it can take a while until i can move on with this, dont expect any changes within next 2 weeks, but well such a program is my "vision" and now where i got tool on my hand to maybe accomplish this vision i will not let loose!

Reporting back once i made some Progress or when called.

Read only

ThomasZloch
Active Contributor
0 Likes
1,799

A test import feature is what I always wanted, make sure you post your final solution

I guess the overtaker check has been reinvented several hundred times all over the world by now...I don't understand why SAP doesn't provide this in the standard (at least the small fraction I'm aware of).

Thomas

Read only

0 Likes
1,799

well, i´m at it, tho it flows slowly, since i got some real work to do which is, well what we get paid for