Application Development 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: 

Get values from the screen in cj20n

Former Member
0 Kudos

Hello!

I would like to know how to get the content of fields in the screen before saved to DB or how to access the temporarily buffer to get those details, in transaction CJ20N.

Thanks,

Dalit.

9 REPLIES 9

Former Member
0 Kudos

I have moved your thread to the ABAP forum as I thnk you'll get a better response to your question here.

Former Member
0 Kudos

hi Yaniv,

try Function Modul DYNP_VALUES_READ

example:

REFRESH dynp_values. CLEAR: dynp_values, prog.

dynp_values-fieldname = 'VIQMEL-QMART'.

dynp_values-stepl = sy-stepl.

APPEND dynp_values.

prog = 'SAPLIQS0'.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = prog

dynumb = '1090'

TABLES

dynpfields = dynp_values

EXCEPTIONS

invalid_abapworkarea = 1

invalid_dynprofield = 2

invalid_dynproname = 3

invalid_dynpronummer = 4

invalid_request = 5

no_fielddescription = 6

invalid_parameter = 7

undefind_error = 8

double_conversion = 9

stepl_not_found = 10

OTHERS = 11.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

READ TABLE dynp_values WITH KEY fieldname = 'VIQMEL-QMART'.

MOVE dynp_values-fieldvalue TO d_qmart_val.

joseph

0 Kudos

hi joseph,

first of all thank u very much, but my problems still not solved,

i need to get fields which are not exactly in the screen, but in the sub objects fields - i need fields of documents which are related to the activity under the wbs of the project which means in another screen and not the single main screen of the project(cj20n).

can this function still help me?

thank in advance

yaniv

0 Kudos

hi yaniv,

if u use DYNP_VALUES_READ, and you don't go to the specify screen I think (but maybe i'm wrong) it will not help you.

Maybe you can tell me step by step how can i reach this fields your are talking about so i can help you.

0 Kudos

Hi joseph,

I am Roy, a work colleague of Yaniv.

We need to get components of a project via the function exit of cj20n tran.

The problem is that not all components of the project are passed to the function exit and we can't select them because they are not in the DB until save ends, so we have to get the values from the screen of cj20n - how can we do it?

The component we need is documents which are under project-wbs-network-activity-<b>document</b>.

Are my explanations clear for you?

0 Kudos

shalom Roy,

unfortunately I can't help because where I work we are not maintaining <b>document</b> so I can't debug it.

You are talking about an user exit and you are not getting all the parameters you want. Maybe it's not a problem. take a look on this excelent WebLog:

/people/brad.williams/blog/2005/04/25/userexits--how-do-i-access-inaccessible-data

good luck

0 Kudos

thank you for your help any way.

It didn't solved our problems but thank you for your effort.

best regards

Yaniv

0 Kudos

Hi,

You can use field-symbols to access values from calling program work-area. Let us say your function exit is called from SAPXXXXX main program which has these document values in field DOCYYYYY itab, you can try stopping in the function exit in debugger and see the values in the field (SAPXXXXX)DOCYYYYY, if you do see the values you are interested in, you will be able to get these values.

Assign this field to a field-symbol (complete field qualified with the main-program name) in your user-exit and then you can use these values.

cheers,

Former Member
0 Kudos

it didn't solved your problem?