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

ICP

Former Member
0 Likes
4,561

Below is the program code:


REPORT  ZASSIGN1.

TABLES: KNA1.

*------SELECT-OPTION-----*

.

SELECT-OPTIONS: CUSTCODE FOR KNA1-KUNNR NO INTERVALS.

    WRITE:/ 'Customer List'.

    WRITE:/ 'Customer Code :', CUSTCODE.

    WRITE:/ '------------------------------------------------------------------------------'.

    WRITE:/1 'Customer Code',20 'Customer Name',70 'Address'.

    WRITE:/ '------------------------------------------------------------------------------'.

SELECT * FROM  KNA1 WHERE KUNNR IN CUSTCODE.

    WRITE:/1  KNA1-KUNNR,

           20  KNA1-NAME1,

          70  KNA1-ADRNR.

ENDSELECT.

----------------------------------------------------------------------------------------------

but, when i input CUSTCODE: TMF*

there is an error output as below:

Why there is an ICP code infront of the output?

Thanks, regards.

liyana.

5 REPLIES 5
Read only

custodio_deoliveira
Active Contributor
0 Likes
2,564

Hi,

You defined CUSTCODE as a select options, so ICP is:

CUSTCODE-sign = I "including

CUSTCODE-option = CP "Contains pattern.

It's automatically populated this way when you entered * in CUSTCODE.

Read the online help for select-options for more info.

Regards,

Custodio

Read only

0 Likes
2,564

Hi,

Just to complement your answer:

When you use WRITE: CUSTCODE, actually you are printing the header of internal table that selection-options created.

Debug your code and check the content of CUSTCODE.

Take care!

Furlan

Read only

0 Likes
2,564

so, what can i do to drop the field of SIGN and OPTION

Read only

0 Likes
2,564

For that you can do below:

"IF IT HAS ONE LINE THEN:

READ CUSTCODE INDEX 1.

IF SY-SUBRC IS INITIAL.

WRITE:/ 'Customer Code :', CUSTCODE-LOW.

ENDIF.

"If multiple lines

Loop at CUSTCODE.

WRITE:/ 'Customer Code :', CUSTCODE-LOW.

ENDLOOP..


Thanks,

Naveen

Read only

0 Likes
2,564

ok, noted..

thanks.