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

Help with User Exit

Former Member
0 Likes
1,629

Hello,

I am and include within a user exit and what i am trying to do is:

populating a field that shows up in a screen popup. transaction is iw32 for which the program name is different than that of the screenvalue that im trying to populate. in iw32, in components tab, i add a component and then i get a popup to populate the purchasing group field and this is the field that i am trying to put a default value into so that I do not get prompted. Please help.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,571

Hey Jasmeet

You can definitely get the values of RESBD in this exit. Please use the code below to get the resbd-ingrp value from the screen:


DATA:l_field(60)         TYPE C        VALUE '(SAPLCOMK)RESBD',
          ls_resbd          TYPE resbd.  
FIELD-SYMBOLS: <fs_resbd>          TYPE ANY.   

*Fetching the Component Item from the Screen. This is for read-only
*purpose and content should not be changed.
ASSIGN (l_field) to <fs_resbd>.
if sy-subrc eq 0.
    ls_resbd = <fs_resbd>.
UNASSIGN <fs_resbd>.
endif.

Now you have all the values in the structure ls_resbd and you can easily set the value for ingrp according to your conditions.

Hope this helps. Let me know if this is what you want.

cheers

shivika

Hey Jasmeet

You can definitely get the values of RESBD in this exit. Please use the code below to get the resbd-ingrp value from the screen:


DATA:l_field(60)         TYPE C        VALUE '(SAPLCOMK)RESBD',
          ls_resbd          TYPE resbd.  
FIELD-SYMBOLS: <fs_resbd>          TYPE ANY.   

*Fetching the Component Item from the Screen. This is for read-only
*purpose and content should not be changed.
ASSIGN (l_field) to <fs_resbd>.
if sy-subrc eq 0.
    ls_resbd = <fs_resbd>.
UNASSIGN <fs_resbd>.
endif.

Now you have all the values in the structure ls_resbd and you can easily set the value for ingrp according to your conditions.

Hope this helps. Let me know if this is what you want.

cheers

shivika

13 REPLIES 13
Read only

Former Member
0 Likes
1,571

Hi jasmeet,

Can you please be more specific as which field you are populating and which exit etc.

Regards,

Atish

Read only

0 Likes
1,571

I am populating field resbd-ekgrp from user exit EXIT_SAPLCOMK_007

Read only

0 Likes
1,571

Hi jasmeet,

I just had a look at that exit and this exit is not having this field in its exporting parameter.

I am just able to see fields CAUFVD-WERKS and RESBD-LGORT as the exporting field.

If the field is not the part of the exporting parameter then you can't pass the changes made to this field in that exit.

Reward points to useful answers.

Regards,

Atish

Read only

0 Likes
1,571

Hi Atish,

What I am trying to do is:

Add a non stock component of type DIEN which is SERVICES and look for the purchasing group for this component in table MARC. If there is an ekgrp, then do nothing but if there isnt one, then assign a dummy group. Does this sound possible?

Read only

0 Likes
1,571

Hi Jasmeet,

yes it can be possible, but I am not sure through which EXIT. you need to find out the exit which has the exporting parameter EKGRP.

Hope this help. Revert back if further query.

Reward points to useful answers.

Regards,

Atish

Read only

0 Likes
1,571

Hi Atish, thanks for your help as well..It works now.

Read only

0 Likes
1,571

Then reward the points to useful answers and close the thread

Regards,

Atish

Read only

Former Member
0 Likes
1,572

Hey Jasmeet

You can definitely get the values of RESBD in this exit. Please use the code below to get the resbd-ingrp value from the screen:


DATA:l_field(60)         TYPE C        VALUE '(SAPLCOMK)RESBD',
          ls_resbd          TYPE resbd.  
FIELD-SYMBOLS: <fs_resbd>          TYPE ANY.   

*Fetching the Component Item from the Screen. This is for read-only
*purpose and content should not be changed.
ASSIGN (l_field) to <fs_resbd>.
if sy-subrc eq 0.
    ls_resbd = <fs_resbd>.
UNASSIGN <fs_resbd>.
endif.

Now you have all the values in the structure ls_resbd and you can easily set the value for ingrp according to your conditions.

Hope this helps. Let me know if this is what you want.

cheers

shivika

Read only

0 Likes
1,571

Hi Shivika,

Somehow I cannot get the purchasing group field which is resbd-ekgrp field to populate in the pop up ...i keep getting mesage to enter the purchasing group.

Read only

0 Likes
1,571

Hi Shivika,

I have been able to do it. Thanks a lot for your help.

Read only

Former Member
0 Likes
1,571

hey

can you tell me how you solved it?

Read only

0 Likes
1,571

Hi Shivika, I did exactly what you said and added my search condition to retrieve the value that i wanted to populate the field with, and it worked.

Read only

Former Member
0 Likes
1,571

thats great

cheers