Skip to Content

Could any one help me in providing alternative for field symbols in For all entries ?

Hello Everyone,

I'm having a dynamic table <fs_a> in which there are key fields A and B. There is another table <fs_b>. and select statement goes as shown below.

Select A B C from (Any_Standard_table) into table <fs_b>

for all entries in <fs_a>

where A = <fs_a>-A

AND B = <fs_b>-b.

where <fs_a> and <fs_b> are declared as 'TYPE ANY TABLE'.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 05, 2017 at 10:20 AM

    Hi Sravan,

    Check the Idea in the code bellow :

    *******************************************************************

    FIELD-SYMBOLS: <fs_a> TYPE ANY TABLE,
    <fs_b> TYPE ANY TABLE.

    DATA: ClauseWhere TYPE TABLE OF string.

    * ASSIGN ... <fs_a>
    *....
    * ASSIGN ... <fs_B>
    *...

    APPEND 'Field1 = <fs_a>-A and' TO ClauseWhere. " Field1 of Any_Standard_table
    APPEND 'Field2 = <fs_a>-B ' TO ClauseWhere. " Field1 of Any_Standard_table
    *....

    select A B C
    from (Any_Standard_table) into table <fs_b>
    FOR ALL ENTRIES IN <fs_a>
    where
    (ClauseWhere)

    *************************************************************

    Regards,

    Salah.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 05, 2017 at 09:44 AM

    The example above will never work, you can't use your result as a selection criteria.

    ...AND B = <fs_A>-b. 

    should work.

    Please use the code format when posting code, it makes it much easier to read.

    Add comment
    10|10000 characters needed characters exceeded