Application Development 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: 

Add I/O field on custom screen using SE51

Former Member
0 Kudos

Hi,

I have custom screen and I want to add one text field and one input/output field on it. Is it enough to drag and drop in layout view, or I have to do some coding in logic flow view?

PROCESS BEFORE OUTPUT.

MODULE PBO_0100.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

Also, what is the difference in coding if I want this input/putput to be declared as custom filed, and

as field from original sap table? where should I declare it, in PBO?

If I use this field as original sap field (for example KNA1-TELF1 CHAR 16), is it possible to put restriction on it, so that first two character be digit, for example 77 ??

Thanks a lot,

Nihad

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Nihad,

You can add your own input field using Enhancements, this feature is available in EC6 systems.

All you have to do is find for an icon like spiral (Enhance Shift+F4), click it, you get a mode opened, Edit->Enhancement Operations->Show Implicit Enhancements Operation.

Wherever you want to make modification, right-click->Enhancement Implementation->Create.

You have to make Enhancement Spot/ section in which you can make modifications. After modifications are done. Activate Enhancement.

This is just a vague idea, I recommend to you.

Please study on 'New Enhancement Framework'.

Hope it helps you Nihad.

14 REPLIES 14

royolav_johansen
Explorer
0 Kudos

Which transaction are you going to add these fields in ?

Some transaction has user-exits for this.

Regards

Roy Olav Johansen

Former Member
0 Kudos

This is Z transaction, and screen is not original but created in z class.

Thanks,

Nihad

Edited by: nihad omerbegovic on Mar 9, 2009 12:55 PM

Former Member
0 Kudos

Hi,

If you want to add new fields on a zprogram made by user and if it is not from a defined table you will have to declare the fields in your program in the top include like nay variable. Make sure the name of the text box you created is same as the variable declared. For example if you add a textbox on the screen and name it txt1 which is of type c and length 10 then make sure to define a variable in your program as

data txt1(10) type c to use it.

If you are using a field from a table check mark the box From Dict in this way it will take the attributes from the dictionary . In the main program define the table using the tables statement, say if you create a field as kna1-name1, then in the program have the statement tables kna1.

Hope this helps.

Regards,

Sachin

Former Member
0 Kudos

Hello Nihad,

You can add your own input field using Enhancements, this feature is available in EC6 systems.

All you have to do is find for an icon like spiral (Enhance Shift+F4), click it, you get a mode opened, Edit->Enhancement Operations->Show Implicit Enhancements Operation.

Wherever you want to make modification, right-click->Enhancement Implementation->Create.

You have to make Enhancement Spot/ section in which you can make modifications. After modifications are done. Activate Enhancement.

This is just a vague idea, I recommend to you.

Please study on 'New Enhancement Framework'.

Hope it helps you Nihad.

Former Member
0 Kudos

HI,

No,need of doing coding for that,but needs do prperty according to the your requirement

check this link

http://www.olemiss.edu/projects/sap/UM_ABAP_Development_Standards.pdf

Thanks and regards

Durga.K

0 Kudos

Hello Durga,

You cannot post external links in SDN, since it goes against Rules of Engagements.

Most probably, Moderators will check about it.

Don't take it offended mac.

matt
Active Contributor
0 Kudos

>

> Hello Durga,

> You cannot post external links in SDN, since it goes against Rules of Engagements.

> Most probably, Moderators will check about it.

> Don't take it offended mac.

You can post external links. What is frowned upon is simply doing a keyword search and posting the first link(s) found. Where a link is posted and there is additional relevant information, then that is perfectly acceptable.

Former Member
0 Kudos

Thanks for replies

Zahack, I am working on 4.6c so I can not use Enhacements right?

Nihad

0 Kudos

Or you can go for Classic BADIs, just check SE18 for BADI Creation and SE19 to create implementation for a BADI.

Thanks: Zahack

kamesh_g
Contributor
0 Kudos

Hi

You have drag and drop on screen .

In PBO of screen you have to put that filed chain end chain.

chain .

filed1.

end chain.

above syntax will put your field input enable .

Former Member
0 Kudos

Thanks, I drag and drop field, I declare it in PBO block (as kna1-teln1, or any field from z table...), but how to link this field with the rest of the screen functionality, is this enough or I need some more coding and where? What about field properties.. and also PAI? I have a bit complicated screen so I need a little help thanks, and I have to add simple text field as well...

Thanks,

Nihad

0 Kudos

Hi Nihad,

Just a simple scenario as an example, you have to add two numbers enter from the user.... so in the selection screen will you keep three text fields or two text fields,

two text fields right, because the third text field probably would not make any sense for the user and also in the program prospective because you are not using it in your code....

hence I just wanted to inform you with this example that, if you are adding any field on the screen you have to write a piece of code so that it has some business and technical meaning for it to appear on the screen.

The piece of code may depend on the requirement it may be on PBO for any updation purpose or in PAI for any result purpose... that will depend on the requirement you have for that field since you are in a better position to decide as you know what is the requirement for that field and why it needs to be added on the screen.....

Regards

Siddarth

Former Member
0 Kudos

I need this i/o field and it will be phone number (9 digits) of the end user. this number will be entered from the keybord. screen is related to retail store...

Also, I need to put restriction on first 2 digits that will be entered in this field (for example if I enter first two digits different from 05 I must get error message...)

Thanks,

Nihad

0 Kudos

Hi,

Try something like if the text box (I/O) is name as txttel then check soemthing like

if txttel+0(2) NE '05'.

message 'Invalid prefix' type 'E'.

endif.

Hope this helps.

Regards,

Sachin