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

Click a execute button using SY-UCOMM

Former Member
0 Likes
2,174

Hi Friends,

I have used CALL TRANSACTION 'CJ8G' in my report. When I execute it, the screen comes up. How do I code to automatically click the execute button in that screen (CJ8G) ? I've been stuck with this for quite sometime now.

Please help.

Thanks in advance.

Regards,

Dikshitha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,411

Hi,

In the transaction 'CJ8G' controlling area is the input field which is mandatory, so for this field

you find the Parameter ID , then call the transaction by skipping the first screen.

see the below example:

SET Parameter ID 'KOK'. " KOK is the Paramter ID for controlling area field.

CALL TRANSACTION CJ8G AND SKIP FIRST SCREEN.

Regards

Satish Suri

5 REPLIES 5
Read only

Former Member
0 Likes
1,411

Hi,

CALL TRANSACTION <tcode>AND SKIP FIRST SCREEN.

Before calling this statement you need to set the parameter using the SET PARAMETER ID <ID>.

Read only

Former Member
0 Likes
1,412

Hi,

In the transaction 'CJ8G' controlling area is the input field which is mandatory, so for this field

you find the Parameter ID , then call the transaction by skipping the first screen.

see the below example:

SET Parameter ID 'KOK'. " KOK is the Paramter ID for controlling area field.

CALL TRANSACTION CJ8G AND SKIP FIRST SCREEN.

Regards

Satish Suri

Read only

Former Member
0 Likes
1,411

I've done the SET PARAMETER for all the mandatory fields in CJ8G. When I execute the program its taking me to the screen with all the values in place.

My question is how do I execute CJ8G from my program after filling all the values in the respective fields.

Please help.

Regards,

Dikshitha

Read only

0 Likes
1,411

Try this way....

Record the transcation which u want to execute & fill the BDCDATA structure & pass it while calling the transcation. Refer below code .

DATA: BDCDATA TYPE TABLE OF BDCDATA.
        DATA: WA_BDCDATA TYPE BDCDATA.
        DATA: TEMP(12) TYPE C. 

       WA_BDCDATA-PROGRAM  = 'ZQMPNK_FLASH_REP_ENT_NEW'.
        WA_BDCDATA-DYNPRO   = '0050'.
        WA_BDCDATA-DYNBEGIN = 'X'.
        APPEND WA_BDCDATA TO BDCDATA.

        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'GRREJ'.
        WA_BDCDATA-FVAL     = 'X'.
        APPEND WA_BDCDATA TO BDCDATA.

        CLEAR WA_BDCDATA.
        WA_BDCDATA-PROGRAM  = 'ZQMPNK_FLASH_REP_ENT_NEW'.
        WA_BDCDATA-DYNPRO   = '0100'.
        WA_BDCDATA-DYNBEGIN = 'X'.
        APPEND WA_BDCDATA TO BDCDATA.

        EXPORT TEMP FROM NEW_INSPLOT-PRUEFLOS TO MEMORY ID 'LOT'.

        CALL TRANSACTION 'ZQM_01_NEW' USING BDCDATA MODE 'E'.

Hope this solves your problem.

Read only

0 Likes
1,411

Hi ,

select the excute button also while doing the Recordiing and populate all the fields which are mandatory.

Then the transction will excute automatically..

regards..

gowri