cancel
Showing results for 
Search instead for 
Did you mean: 

Table with header line Smartforms

Former Member
0 Kudos

Hi,

I have a problem in smartforms :

Error message :

The internal table "IT_RIB" has no header line - explicit specification of an output area with "INTO wa" ...

In global definition->TYPES :

 
TYPES: BEGIN OF TYPE_INV_ITM ,
        bankl LIKE t012-bankl,
        bankn LIKE t012k-bankn,
        bkont LIKE t012k-bkont,
END OF TYPE_INV_ITM.

types : IT_INV_ITM TYPE TABLE OF TYPE_INV_ITM.

Global data :

WA_RIB TYPE TYPE_INV_ITM

IT_RIB TYPE IT_INV_ITM

program :


SELECT F1~MANDT F1~BUKRS F1~HBKID F1~HKTID F2~BANKS F2~BANKL F1~BANKN F1~BKONT

     INTO it_T012K
    FROM T012K AS F1
     INNER JOIN T012 AS F2
     ON F1~BUKRS = F2~BUKRS
     where F1~BUKRS = '1003'.

    MOVE it_T012K-BUKRS TO wa_RIB-BUKRS.
    MOVE it_T012K-BANKL TO wa_RIB-BANKL.
    MOVE it_T012K-BANKN TO wa_RIB-BANKN.
    MOVE it_T012K-BKONT TO wa_RIB-BKONT.
    append wa_RIB to IT_RIB.
ENDSELECT.

READ TABLE it_rib index 1.

I can't read index 1 because they are no header line.

I have test with a break-point, the table it_rib is not empty.

need help.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you are trying to read itab data with index 1. but that internal table does not have any work area. so it is giving that error. read table like this

READ TABLE it_rib into WA_RIB index 1.

Hope this will solve your problem.

Regards,

Aswini.

Answers (3)

Answers (3)

Former Member
0 Kudos

READ TABLE it_rib into WA_RIB index 1.

that's work. Thanks a lot for your reply.

Former Member
0 Kudos

Hi,

you need to pass the internal table that you are passing from the program in the form interface section of the smartform.

declare a structure and table type in abap dictionary and declare it_T012K of type table type of the structure.

Then write the move code in the initialization of global definitions

regards

padma

Former Member
0 Kudos

Hi..try this.

READ TABLE it_rib into WA_RIB index 1.