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: 

Field Exit CJCAJONR help!!

Former Member
0 Kudos

Hi,

I am writing a field exit, and I need to import from memory the parameter 'CJCAJONR', but when I do it the value is empty.

The transaction that I am using is FBCJ. What I want to do is to validate the fields 'company code' (TCJ_C_JOURNALS-COMP_CODE) and 'cash journal'(TCJ_C_JOURNALS-CAJO_NUMBER) to match with a Z table when changing cash journal.

I got both parameters KUN (company code) and CJCAJONR (cash journal), with:

DATA: mem_bukrs LIKE tcj_c_journals-comp_code. DATA: mem_caj_no LIKE TCJ_C_JOURNALS-CAJO_NUMBER.

GET PARAMETER ID 'BUK' FIELD mem_bukrs.

GET PARAMETER ID 'CJCAJONR' FIELD mem_caj_no.

But when I check the variable´s values mem_bukrs is full but mem_caj_no is empty.

Any idea where can I get the value for the parameter 'CJCAJONR'?

Also I checked the ABAP memory but could not find it.

Thanks!!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

It may be empty as it might not be set by the program.

You should mention the tcode etc.

If in the field exit you are trying to get the values from screen then use function DYNP_VALUES_READ instaed of SAP memory . SAP memory is cross transaction and may not be robust .

Cheers.

( Dont forget to reward if answers were helpful )

7 REPLIES 7

Former Member
0 Kudos

It may be empty as it might not be set by the program.

You should mention the tcode etc.

If in the field exit you are trying to get the values from screen then use function DYNP_VALUES_READ instaed of SAP memory . SAP memory is cross transaction and may not be robust .

Cheers.

( Dont forget to reward if answers were helpful )

0 Kudos

Hi Sanjay,

Thanks for your help, but I have another question.

In the same tcode 'FBCJ', I see that there are some fields that in the techinical information have the same Data element, and what I understand of field exit teory is that it takes as input the field that dynpro´s data element has, i would like to know, how do I take for example (In the tcode 'FBCJ') the field dynpro 'F_RUN_BALANCE' instead the field 'F_BEG_BALANCE' into my field exit code?.

Thanks.

0 Kudos

Field exits can be used when dictionary fields are used directly on screen ( For example MARA-MATNR ).

If you have field defined in your program say

DATA WA_MATNR TYPE MATNR. and then on screen you use field WA_MATNR . Even though this field points to data element MATNR the field exit will not work for this field . For field exit to work you should use direct dictionary fields like MARA-MATNR . MARC-MATNR with check box dict field checked in screen painter attributes.

For FBCJ I guess those two fields point to a data element but since they are not directly a dictionary field , even if you activate field exit in the two fields it would not work.

Cheers

0 Kudos

Hi Sanjay,

If i can´t do it with it, what can I do to solve the problem? what would you do to get that field (F_RUN_CASH_BALANCE tcode fbcj)?

0 Kudos

Hi Gabriel ,

First of all I am not clear why are developing field exit . I can comment only if you can tell the reason behind developing a fiedl exit .

So if field exit is not possible you may have to find a user exit to achieve the functionality .

You have another post open on a similar topic . Please close that post.

Cheers.

( Don't forget to reward if answers were helpful 0

0 Kudos

Hello Again!!!

What I want is to show a message when the cash in the cash journal is about to be over and when the cash its going over a limit. That is what I want, I looked for a user exit but the tcode FBCJ doesn´t have one. Thaks again for your help, I´ll reward you.

0 Kudos

Sanjay,

It finally worked with the DYNP_VALUES_READ, thanks a lot for your time!!

Regards,

Gabriel