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

Calling transaction from another report

Former Member
0 Likes
3,715

Hi all,

I have a requirement like.

I need to call a transaction from my report.

Then, i need to check the values generated from called transaction. Based on some creteria i need to process further.

How can i achive this?

Eq:- I have to clear open items.

From my report program i need to call transaction FBL3N using BUKRS (Company Code) to view all XOPSEL (Open Item Status), using ALLGSTID (Open at key date): Todayu2019s date.

-If the transaction returns no open items, return Yes and green

-If the transaction returns line items, return No and red

this is my requirment how can i achive this.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,339

hI,

Use set parameter id if it exists., otherwise do the bdc program for that t-code and pass the values which depends on you .,., then assign one t-code for that bdc program and call in your main program with

call transaction ztransaction and return. (transaction name) or submit zprogram and return (pgm name)

Thanks,

ThiruKumaran. R

11 REPLIES 11
Read only

Former Member
0 Likes
2,339

Hello Praveen Kumar,

You can try this but what all the value u r passing to Tcode you should have a paramater id for if is like then in place '0401' give the work area company code value.

It is working fine i have test it.

SET PARAMETER ID: 'BUK' FIELD '0401'.

CALL TRANSACTION 'FBL3N'.

If you dont have Parameter id for the transacion better u go to submit program via selection screen and Submit program for u r (Tcode FBL3N) is RFITEMGL.

Edited by: Santosh Marupally on Oct 22, 2008 11:42 AM

Read only

Former Member
0 Likes
2,339

Hi,

As per your req, u need to process ur report based on some values in that the stand SAP program. there is one way our

first u identify the program let the program name be X and identify the field , let it be var , using a field symbol u can get the value...

for examle

FIELD-SYMBOLS : <ref> TYPE ANY.

data : wrk_string(40) TYPE c.

wrk_string = '(X)VAR'.

ASSIGN (wrk_string) TO <ref>.

in this ref u can get the value...

try this out.

Regards

Maneesh Chandran

Read only

Former Member
0 Likes
2,339

Try this,

In when user command triggers

SET PARAMETER ID 'TCD' FIELD internal table -field name

CALL TRANSACTION 'FBL3N' AND SKIP FIRST SCREEN.

Read only

Former Member
0 Likes
2,339

hi all,

Can i call take the data from the called report or transaction.

If yes how can i achive that.

for eg:-

Report YXXXX.

Call transaction 'PRCCD'.

can i get the out put details after running this transaction.

If so how can i get it into my report YXXXX.

Help me

Read only

Former Member
0 Likes
2,340

hI,

Use set parameter id if it exists., otherwise do the bdc program for that t-code and pass the values which depends on you .,., then assign one t-code for that bdc program and call in your main program with

call transaction ztransaction and return. (transaction name) or submit zprogram and return (pgm name)

Thanks,

ThiruKumaran. R

Read only

Former Member
0 Likes
2,339

Hi Kumaran,

Thanks for the help.

My requirement is like this.

From my report i will cal another report.

What the output i will get from the called report, i need to check the data and validate the same.

Then i need to proceed further.

For eq:-

Report MyReport01.

Calling MyReport02.

MyReport02 will generate a report for a given company code the balances for each account.

I need to check whether balances are zero for each GL-accounts.

How can i check this after calling MyReport02 in MyReport01?

help me

Read only

0 Likes
2,339

Hi Praveen,

U do one thing, populate the data of first report into one internal table say g_t_first.

Then export the data of g_t_first using

EXPORT g_t_first to memory id 'XXX.

Use SUBMIT for calling another report.

Now import the data of first report using

IMPORT g_t_first from memory id 'XXX'.

Hope useful to you.

Regards,

Priya...

Read only

0 Likes
2,339

Hi Priya,

Will the internal table contains output report of called report.

After importing this will contain output of report called.

Read only

Former Member
0 Likes
2,339

Hi praveen,

To get the results from the calling transaction you should collect the message.

So you can proceed as follows;

Record a BDC for FBL3N with company code as input.

In call transaction of BDC use Messages into itab option.

Now you can get the message in the internal table, using the message number you can determine whether there are open line items or not.

Here the following messages may return;

MSITEM024 - Items displayed

MSITEM033 - No items

Hope this will help you.

Regards

Karthik D

Read only

Former Member
0 Likes
2,339

hi,

i have a tcode for report writer. Can i use this in BDC to record and use it my program to indentify whether data exists after execution of this tcode.

help me out.

Read only

0 Likes
2,339

Hi,

If you just want to check out whether the tcode is returning results, you can use the method given by me by recording a BDC for that tcode.

Regards

Karthik D