cancel
Showing results for 
Search instead for 
Did you mean: 

getting VIQMFE data in user exit when editing PM notification

0 Kudos
845

Hi all,

I need to calculate a value of Z field in VIQMEL when the user is creating or editing PM notification ( trans. IW21/2).

I use user exit EXIT_SAPMIWO0_009 (Transfer Notification Data from User Screen) where I can edit the VIQMEL entry.

My problem is that the calculation needs values from VIQMFE (fekat,fegrp,fecod), and I don't have them in the exit mentioned above.

I tried to find some other user exit where the values are full and save them to the memory, but couldn't find any place where I can do that.

Do you have any idea how to solve this?

thank you, Mo

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Got a tip from a team member that solved my problem -

getting the values from the screen using FM DYNP_VALUES_READ:

DATA: ls_dynpfields TYPE dynpread,

lt_dynpfields LIKE TABLE OF ls_dynpfields,

* get fecod from screen

ls_dynpfields-fieldname = 'VIQMFE-FECOD'.

APPEND ls_dynpfields TO lt_dynpfields.

ls_dynpfields-fieldname = 'VIQMFE-FEGRP'.

APPEND ls_dynpfields TO lt_dynpfields.

CALL_FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = 'SAPLIQS0'

dynumb = '7324'

TABLES

dynpfields = lt_dynpfields

EXCEPTIONS

...

peter_atkin
Active Contributor
0 Kudos

This may not work in all situations e.g.

  • The user doesn't visit the specified screen
  • The create/change screens are often different
  • Configuration settings in the notification

PeteA

Answers (3)

Answers (3)

peter_atkin
Active Contributor
0 Kudos

Mo,

Try FM READ_NOTIFICATION instead.

PeteA

0 Kudos

Unfortunately it acts the same as READ_NOTIFICATION_POSITION in my scenario

raymond_giuseppi
Active Contributor
0 Kudos

Try to call the FM READ_NOTIFICATION_POSITION with the I_BUFFER parameter set to abap_true.

(You could first check in debug for vaues available in global data LVIQMFE[] of function group IWO0, include LIWO0TOP)

0 Kudos

Hi Raymond, thanks for your reply.

This doesn't return any data in qmfe (when calling without i_buffer it returns the saved data).

Am I doing something wrong?

APPEND e_viqmel TO lt_viqmel.

CALL FUNCTION 'READ_NOTIFICATION_POSITION'

EXPORTING

i_buffer = abap_true

TABLES

iviqmel = lt_viqmel

iviqmfe = lt_viqmfe

.

peter_atkin
Active Contributor
0 Kudos

Mo,

The catalog codes are not available in the standard user-exit QQMA0001 import parameters - but you can read this data from memory. This can usually be done via standard function modules, if not, then you can use field-symbols to get the data.

Talk to your ABAP team who should be able to help.

PeteA

0 Kudos

Hi Pete, thanks for your reply.

Do you know standard FM I could use to get the values in this scenario? I couldn't find any.

And I didn't understand your second suggestion (I am from the ABAP team), could you explain?

peter_atkin
Active Contributor
0 Kudos

Have you tried Raymond's READ_NOTIFICATION_POSITION suggestion below?

PeteA