‎2007 Mar 27 12:18 PM
HI friends,
Is it possible to add new fields to a table control on a screen using a BADI.????????
and if yes can u explain with an example...The screen and the BADI that i want to modify is a custom based one so will not able to mention them since it wont be possible for u to view it...
Regards,
Mansi.
‎2007 Mar 27 12:43 PM
Hi Mansi,
It's is not possible to add new fields in the table control simply because the underlying structure of the internal table on which the table control is based cannot be changed at runtime.
It's not possible to change table control ..adding/deleting fields at runtime thru any medium.
You can directly try to edit the SAP standard program .
Hope this helps
Regards
Nishant
‎2007 Mar 27 12:35 PM
Hi,
Why you need a BADI to add new fields to your Custom Transaction Table control?
You can change them manually by changing the code? what's the problem?
There will be no BADI's for custom based Transactions.
If you want you can design a BADI for your own code, but it is simple to change the code instead of designing a BADI.
SAP provided BADI's for STD ENJOY transactions like PO and GR etc
reward if useful
regards,
ANJI
‎2007 Mar 27 12:46 PM
Actually,,,its not possible to modify so i need to use BADi...can u tell me how to add fields to a table control...
‎2007 Mar 28 6:54 AM
Okie let me try and explain.
If you open a transaction screen you'll find that if you go to
SYSTEM-> STATUS
u'll find the main program name , screen number and in case there is a subcreen then the subscreen program name and the number.
In case it does not have that then u'r table control is in main program else if it's also having subcreen you need to check the subscreen also.
Now, that you have found the table contol you can edit it in se80 or se51 .
This is standard SAP so you'll also need to get an access key from SAP to edit it.
Once you are able to edit it's like any Z program
so u can edit it.
Also, you'll have to put the logic to fill the added fields in the change table control so for that you'll have to analyze how the value is getting filled.
and in case it has a change and save option u need to handle it there also so that the value entered /changed in the custom added field get populated in the table you want.
Also, If there is a BDC using that then you need to change that also
hope this helps
Regards
Nishant Rustagi
‎2007 Mar 27 12:39 PM
for a custom rogram u can goto SE51 and specify the program name and goto layout editor and u can change the table control directly....
‎2007 Mar 27 12:40 PM
Hope this will help you....
http://www.saptechnical.com/Tutorials/ABAP/XD01/XD01.htm
Reward if helpful...
‎2007 Mar 27 12:43 PM
Hi Mansi,
It's is not possible to add new fields in the table control simply because the underlying structure of the internal table on which the table control is based cannot be changed at runtime.
It's not possible to change table control ..adding/deleting fields at runtime thru any medium.
You can directly try to edit the SAP standard program .
Hope this helps
Regards
Nishant