Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Hi,

This Document illustrates about how to search based on given input any two letters  using CP sql command (CP : Contains Pattern).

Scenario : when we enter any  number or any input like '00' in input field  , it should search all the material numbers which consists of '00' as shown below .

1.Enter any value in the input field whixh should be relavent to input field.

2.After click on F4 Help , result should be as shown below.

Program :

declare a range for BOM number and please use the below code for creating input help.

TYPES : BEGIN OF ty_range,

           sign TYPE char1,

           option TYPE char2,

           low TYPE stko-stlnr,

           high TYPE stko-stlnr,

     END OF ty_range.

TYPES : BEGIN OF ty_stko ,

         stlr TYPE stko-stlnr,

         END OF ty_stko.

DATA: lt_stko TYPE STANDARD TABLE OF ty_stko,

       lw_stko TYPE ty_stko,

       lt_range TYPE STANDARD TABLE OF ty_range,

       lw_range TYPE ty_range.

PARAMETERS bom TYPE stko-stlnr.

*---->Processing

******Check for BOM List for the given input value

lw_range-sign = 'I'.

lw_range-option = 'CP'.

CONCATENATE '*' bom  '*' INTO lw_range-low.

APPEND lw_range TO lt_range.

SELECT stlnr

   FROM stko

   INTO CORRESPONDING FIELDS OF TABLE lt_stko

   WHERE stlnr IN lt_range .

just change the table and field names it will work...

Thanks and Regards,

Lokeswar Reddy Byni.


2 Comments