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

TCODE COHV - CAPTURE SCREEN PARAMETERS FROM USEREXIT

Former Member
0 Likes
1,885

Hello all:

The specs given to me include to capture production orders in TCODE COHV with certain selection status profile (Screen field is P_SELID). I did identify an userexit (EXIT_SAPLCORE_003) that goes thru TCODE COHV when the user tries to Technically Complete production orders. Is there is a way that I can capture the parameters in COHV at the moment the transaction is executed from EXIT_SAPLCORE_003?, or there is a way to keep a log of the TECO production orders with a certain profile at the moment of the transaction execution?

Hello all:

The specs given to me include to capture production orders in TCODE COHV with certain selection status profile (Screen field is P_SELID). I did identify an userexit (EXIT_SAPLCORE_003) that goes thru TCODE COHV when the user tries to Technically Complete production orders. Is there is a way that I can capture the parameters in COHV at the moment the transaction is executed from EXIT_SAPLCORE_003?, or there is a way to keep a log of the TECO production orders with a certain profile at the moment of the transaction execution?

6 REPLIES 6
Read only

Former Member
0 Likes
1,445

Hello Erik,

If P_SELID has an SET/GET Param-ID You can

fetch it using

GET PARMETER ID '<Param-id>' FIELD <variable>

You will find the PARAM-ID while processing the DYnpro

presssing <F1> within the field P_SELID

and click the Toolbox-Symbol.

Hope i could help You

BR

Michael

Read only

Former Member
0 Likes
1,445

There's a function module PRINT_SELECTIONS that will store all screen values into an internal table.

Regards,

D.

Read only

0 Likes
1,445

Sound interesting, Have you got and example of how this would be executed, for example in this case what would put into the variant field (i.e. what if it was not run with a variant?).

Read only

0 Likes
1,445

If a variant is specified, then table contains values stored in the variant. If no variant specified (value - SPACE) then table contains values entered into screen at runtime.

Regards,

D.

Read only

Former Member
0 Likes
1,445

Hello Eric,

May be i am wrong, but I guess You have to watch following points:

To read the selection-screen parameters works fine until you are still in the Main-program-context.

But if You will fetch the data within a Function-Module,

i think it won't work.

SET/GET Parameter-ID works in the whole session-context.

BR Michael

Read only

0 Likes
1,445

unfortunatly i dont think the field he wants to retrieve has a parameter ID on it