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: 

Enhance infotype 0002 to include dropdown fields

Former Member
0 Kudos


Hello People,

Please i have a requirement and i will appreciate a step by step guidance on it.

i want to enhance an info type precisely 0002 to include 2 fields say state and provinces.

I want the state field to be drop down such that if i click on it, it will show me all the states and if i select a state, I want the province field to show me all the provinces available in that state so that i can choose from.

please I will appreciate a step by  step guidance -
that table to be created,
the domains if need and the linkages
and all other details that might be of help.

Many thanks

6 REPLIES 6

former_member184569
Active Contributor
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Thank you very much. Apparently I have these documents and both were quite helpful.

But I does it give the flexibility of having my field in dropdown. This is the major requirement I need.

Like I said i want to enhance an info type precisely 0002 to include 2 fields say state and provinces.

I want the state field to be a drop down such that if i click on it, it will show me all the states and if i select a state, I want the province field to show me all the provinces available in that state so that i can choose from.

Regards

0 Kudos

Yes you can make it a drop down by going to the screen painter for the custom subscreen.

Set the attribute of the field defined as drop down.

Populate the values in the drop down in the PBO using FM CALL FUNCTION 'VRM_SET_VALUES'.

It will work fine.


former_member188217
Active Participant
0 Kudos

This message was moderated.

0 Kudos

Hello,

Step 1: Enhance the Infotype 0002 with Tcode PM01. Here you can add the two custom field, namely State(ZSTATE) and Provice(ZPROVINCE) in the CI_0002.

Step 2: Open the suitable screen number(Using the Module Pool), that has the custom fields. Here you need to change the input fields characteristics. Then go to "Layout" of the module pool. You would find the two fields that you have added.

Step 3: Click on field ZSTATE and make  Dropdown as "listbox". Click on field ZPROVINCE and make Dropdown as "Listbox". You go back to the module pool program.

Step 4: Here in the section Module before output, you can create your own module to populate the values of State field from the SAP table. The list of states can be put in the form of list boz, using FM 'VRM_SET_VALUES'. You can search out this function over internet and would get numerous help on it.

Step 5: You can use FM 'DYNP_VALUES_READ' to know what values you have put for ZSTATE field. Based on the contents of ZSTATE field that you have selected, you can query the respective SAP table that holds the Province details. The ZPROVINCE field, you can either make as "Listbox" or you can provide F4 kind of help. If you are using list box, you have to use FM 'VRM_SET_VALUES' to display all provinces. if you need F4 help, use FM "F4IF_INT_TABLE_VALUE_REQUEST.

Some tables that may help

T005U - Here you will get Regin/County/Provice based on Country Code

T005S

T005U

Hope this helps you.