Skip to Content
0
Former Member
Mar 20, 2009 at 06:45 AM

how to maintain the sequence in the custom table

286 Views

Hi,

We have custom table where we will store the standard text name based on different flags and it will be fetched the value according to the condition.

Example code

SELECT SINGLE field1

field2

INTO ( vaiable1 variable2 )

FROM custom table

WHERE tdobject = iv_signature

AND bukrs = vbdkr-bukrs

AND vkorg = iv_vkorg

AND vkbur = iv_vkbur

AND lland = vbdkr-land1

AND fkart = vbdkr-fkart

AND kschl = iv_kschl.

CHECK sy-subrc <> 0.

SELECT SINGLE field1

field2

INTO ( vaiable1 variable2 )

FROM custom table

WHERE tdobject = iv_signature

AND vkorg = iv_vkorg

AND vkbur = space

AND fkart = vbdkr-fkart

AND kschl = iv_kschl.

CHECK sy-subrc <> 0.

SELECT SINGLE field1

field2

INTO ( vaiable1 variable2 )

FROM custom table

WHERE tdobject = iv_signature

AND vkorg = iv_vkorg

AND vkbur = space

AND fkart = vbdkr-fkart

AND kschl = space.

The solution I created to avoid the select is, i have created the FM with all parameter. Addition to the FM, I have created a Table as well to maintain the flag.

New table

TDOBJECT TDID BUKRS VKORG VKBUR KUNNR MWSKZ AUART VGBEL_AUART KTGRM LLAND FKART WERKS KSCHL STNAME

FOOTER X X ZNET_DICI_FTR_FI

FOOTER X X ZNET_DICI_FTR_NL

FOOTER X X X

i.e. say example if we maintain the value in the custom table based on the first select query. Then we need to maintain the flag in the table which was created newly.

Note In the both field the key fields are same.

The problem now is we have plenty of select query for different condition, i though of maintain the sequences of the entries. But my worry is how many sequence number will be maintained and in what bases it will be maintained.

Could you please help me to resolve this problem?

Regards,

Vijay