cancel
Showing results for 
Search instead for 
Did you mean: 

select data from custom table (smartform's novice)

juanluis_ragel
Participant
0 Kudos

Hi experts!.

I have a dictionary table ZTITLES and I want my smartform select title from ztitles where blart is &BKPF-BLART&. But I don't know where I have to do this.

I try to add a window and I created node --> flow logic --> Program Lines, but system said me: "Field &T_KBLD-BLART& is unknown."

And I try to to the same in "Global Definitions" but dont work, system said me the same error.

Can`t I write &<field>& ? Why?

Where I can do this?

A lot of thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

In the input parameters of program line wrire t_kbld-blart . The output table or variable from program lines should be written in output parameters .

Or

after defining variables in global declarations u can write the required code in the

initializxation section of global definitions .

Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Create program lines

declare a variable for BLART field

then using the Doc number(BKPF-BELNR)

fetch the BLART field into the variable

and write a select to the ZTitles table and fetch the data into a internal table and use

<b>Reward points for useful Answers</b>

Regards

Anji

juanluis_ragel
Participant
0 Kudos

Sorry but I don't understand you because maybe I don't explain my problem correctly.

This is my code now in Program lines:

TABLES: ZTITLES.

data: zblart type ZTITLES-BLART.

select SINGLE BLART2 from ZTITLES INTO zblart

where LANGU = sy-LANGU

and blart = &BKPF-BLART&.

My error: "Field &BKPF-BLART& is unknown".

Former Member
0 Kudos

as per my knowledge u should declare the tabel in the Form Interface from which the field BLART would be read not in the global definition.

regards

Abhilasha Gupta