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

Error in drop-down list.

former_member202335
Participant
0 Likes
541

Hi,

I have created a drop-down list in my screen and the list is supposed to display 4 values. However, in addition to those 4 values, I also get a blank value in the end. I have not been able to figure out why.

The list is being populated using the following code: -

  • Load PT status to screen.

SELECT status status_txt

FROM zptp_rcd_status

INTO CORRESPONDING FIELDS OF TABLE p_status_filter

WHERE sprsl = sy-langu

AND status <> zrcd_pt_st_completed

AND status <> zrcd_pt_st_reversed.

IF sy-subrc <> 0.

MESSAGE e024.

  • Error getting purchase ticket status

ENDIF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'STATUS'

value_org = 'S'

TABLES

value_tab = p_status_filter

EXCEPTIONS

OTHERS = 1.

IF sy-subrc <> 0.

MESSAGE e024.

  • Error getting purchase ticket status

ENDIF.

I checked the internal table p_status_filter and it contains only the 4 values that are supposed to be displayed (No blank lines). Also, it doesn't contain a header line.

Also, drop-down list in the UI has the following screen attributes: -

Name ZPTP_RCD_PT_HEADER-STATUS

Type I/O

Line 1

Column 115

Deflg 20

VisLg 22

Height 1

Scrollable not checked

Format numc

Input checked

Output checked

Output only unchecked

Dict Field checked

Dict Modified X

Please let me know on the possible causes for this.

Regards,

Divyaman

3 REPLIES 3
Read only

Former Member
0 Likes
503

There is always a blank line when you have a drop down list.

Read only

0 Likes
503

I had a look at the MIGO transaction. I saw the drop-down lists without a blank line. So, I am assuming that it is possible to have it without blank lines.

Regards,

Divyaman

Read only

0 Likes
503

Hi,

The way to remove the blank value is make the field compulsory. I discovered this accidentally recently.

Thanks & regards,

Divyaman