2014 Feb 18 3:57 PM
Hello experts,
I am working on program in which there are some constants defined as below:
CONSTANTS: c_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.
2014 Feb 18 3:59 PM
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.
2014 Feb 18 4:13 PM
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
2014 Feb 18 4:12 PM
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
2014 Feb 18 4:15 PM
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.
2014 Feb 18 4:43 PM
Hello experts,
thanks for reply. I searched them every where in Menu painter, dynpro etc. but not able to find the definitions.
Thanks
Avadhut
2014 Feb 18 4:56 PM
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
2014 Feb 18 5:33 PM
Hello Abhijit,
I didn't declared the code I just want to modify old code and add new functions to it.
2014 Feb 18 5:36 PM
2014 Feb 18 5:42 PM
Hello,
What's your program name? See any SET PF-STATS command is there or not?
Thanks & Regards,
Abhijit
2014 Feb 18 5:26 PM
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
2014 Feb 18 6:28 PM
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
2014 Feb 19 7:07 AM
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
2014 Feb 19 1:33 PM
So according to the code, you should be building new methods.
Neal