cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSCRIPT program: need source code to trigger a data from a structure and display in a form

0 Kudos
696

Hello experts,

first of all, i'm not abaper but a saw several program so, i'm trying...

i'd like to trigger the value of structure QALS_D02 fields VNAME and assign it to a variable V_USER:

this is my program in sapscript:

/ : DEFINE &V_USER& = &QALS_D02-VNAME&

/ : READ QALS_D02 WITH INDEX

/ : SELECT VNAME FROM QALS_D02 INTO V_USER WHERE

QALS_D02-LS_VBELN EQ VBDPL-BSTKD

<B>User ID : &*V_USER& </>

(note that VBDPL-BSTKD is the delivery number that we are processing)

thanks in advance for you king help

Koubra

Accepted Solutions (0)

Answers (3)

Answers (3)

Jelena_Perfiljeva
Active Contributor

We do not write ABAP code in SAPscript forms. SAPscript allows only for some basic control commands.

There should be a program that calls the form and that's where the coding needs to be done. The program fills in the variables and then the variables are inserted in the form. The variable name must match between the form and program.

eduardo_hinojosa
Active Contributor

Hi

You can`t do SELECT inside the lines editor in SAPscript. You need to do it in other program with calls from lines editor type

PERFORM subroutine IN PROGRAM zreport

USING &v1&

CHANGING &value&

ENDPERFORM

In this report you do de SELECT on SAP tables

where VALUE comes from DEFINE

I hope it helps you

Regards

Eduardo

0 Kudos

Hi,

thank to all for your helpful answer.

in fact:

- VBDPL-BSTKD corresponds to field LS_VBELN in the structure QALS_D02

- with this field, i want to trigger th value in field VNAME in QALS_D02

- assign the VNAME value in my variable V_USER.

how can i build the code ?

thanks a lot for your help

0 Kudos

Hi,

thank to all for your helpful answer.

in fact:

- VBDPL-BSTKD corresponds to field LS_VBELN in the structure QALS_D02

- with this field, i want to trigger th value in field VNAME in QALS_D02

- assign the VNAME value in my variable V_USER.

how can i build the code ?

thanks a lot for your help

0 Kudos

Hi,

thank to all for your helpful answer.

in fact:

- VBDPL-BSTKD corresponds to field LS_VBELN in the structure QALS_D02

- with this field, i want to trigger th value in field VNAME in QALS_D02

- assign the VNAME value in my variable V_USER.

how can i build the code ?

can someone help me please to build the source code.

thanks in advance