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

syucomm VALUE ''

Former Member
0 Likes
1,693

Hello experts,

I am working on program in which there are some constants defined as below:

CONSTANTSc_add_product  TYPE syucomm VALUE 'ADD_PRODUCT',

                      c_edit_product TYPE syucomm VALUE 'EDIT_PRODUCT',

                      c_del_product  TYPE syucomm VALUE 'DEL_PRODUCT',

Can anybody know generally where 'ADD_PRODUCT', 'EDIT_PRODUCT' etc. are defined in the program? I have to define VALUE 'ADD_CHILD' in

                      c_add_child    TYPE syucomm VALUE 'ADD_CHILD',


If anybody have any idea please share it with me.



Thanks,


Avadhut Mulay.

13 REPLIES 13
Read only

adrian_mejido
Contributor
0 Likes
1,600

Hi Avadhut,

Try to look if your program has a dynpro. In that case you should look at the STATUS of your dynpro becuase it might have buttoms for those purposes.

Best regards.

Read only

0 Likes
1,600

Also, because they are constants, I'd expect that they are used in conditional statements.

such as

if sy-ucomm =  c_add_product.

do something.

endif.

So look for where those constants are used.

Neal

Read only

Abhijit74
Active Contributor
0 Likes
1,600

Hello,

Go to Se41 and create a new status for your program.

Declare you status like SET PF-STATUS 'XYZ' in your program.

Now double click into it.  It will look like below.

In the above ICON you can double click and assign your user command sy-ucomm here.

Thanks & Regards,

Abhijit

Read only

Former Member
0 Likes
1,600

normally, the constants will be defined in a TOP include or an include residing in the TOP include of the Module Pool program.

Go to SE80 and look at the program and the includes. Also, you can search the source code for the constant you are after in the program whilst in SE80.

Read only

Former Member
0 Likes
1,600

Hello experts,

thanks for reply. I searched them every where in Menu painter, dynpro etc. but not able to find the definitions.

Thanks

Avadhut

Read only

0 Likes
1,600

Hello,

You will not find the code you have declared. If you follow the process then you can assign your user command over there...

Thanks,

Abhijit

Read only

0 Likes
1,600

Hello Abhijit,

I didn't declared the code I just want to modify old code and add new functions to it.

Read only

0 Likes
1,600

What is the program name?  I'm guessing it is a Z code?

Neal

Read only

0 Likes
1,600

Hello,

What's your program name? See any SET PF-STATS command is there or not?

Thanks & Regards,

Abhijit

Read only

ThangaPrakash
Active Contributor
0 Likes
1,600

Hello Avadhut,

Try to do a global search using the binocular icon, during search select "In main program".

Since all constants are related to Function code, it might be used somewhere in the conditional statements like IF or CASE.

Regards,

Thanga

Read only

Former Member
0 Likes
1,600

Hi,

As you mentioned,

I have to define VALUE 'ADD_CHILD' in

                      c_add_child    TYPE syucomm VALUE 'ADD_CHILD',

I do believe this will be related to old constants.

If you share us what exactly you are trying to achieve , will help us to crack the hidden constants

Thanks & Regards,

aRUN

Read only

Former Member
0 Likes
1,600

Hello experts,

Its module pool program with dynpro as well as ALV is also used in it to display hierarchy. What exactly code does is to retrieve data from tables and display it on screen as hierarchy, additionally what we can do is Add, Delete, Edit components in hierarchy. Basically the constants are the FCODE's. I think ADD_ PRODUCT, EDIT_PRODUCT, DEL_PRODUCT are the procedures for hierarchy operations. What i want to do is to Add subproduct below product and write code for its context menu and so on. First I have used ADD_PRODUCT to create subproduct its seems fine but addition in hierarchy takes place at PRODUCT level. Thus i want to write new procedure to create subproduct. FYI, i am attaching code with this post.

Thanks

Avadhut

Read only

0 Likes
1,600

So according to the code, you should be building new methods.

Neal