Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

script

Former Member
0 Likes
903

hi all

i hav an a script in which i need 2 put fields name1 city1 city2 city_code from the table ADRC so i used an perform statement and now in the se38 code i should access the values through the select statement which should be equal to T001-ADRNR...please help...if possible please post the code..am also giving the code in se38 below biut am getting some errors..please help....

REPORT ZF140.

TABLES: ADRC ,T001.

FORM ADDR.

SELECT NAME_1 CITY1 CITY2 CITY_CODE FROM ADRC WHERE ITAB-adrnr EQ ADRC-ADDRNUMBER.

ENDSELECT.

ENDFORM.

with regards

vijay

10 REPLIES 10
Read only

Former Member
0 Likes
873

Hi Vijay,

Have you declared the fields which you have added in the Se38 in your Script /Change editor windoe of the respective Window in which you want to display the fields.

Just check this once, and if not just add the required code in the Change Editor window of the Script.

Hope this resolves your query.

<b>Reward all the helpful answers.</b>

Regards

Read only

0 Likes
873

hi

i cant declare dat because am using the t001-adrnr as the intermediate field like i will be equalling that in the se38 code...please chec d code i given u and make correcitions 2 dat dat is enough...thanks 4 d support

Read only

Former Member
0 Likes
873

hi,

After getting the data into itab, read the table with the index 1 and append to the output table declared in the perform.

perform in program <prgname> using v_input_variable value

changing &v1&

changing &v2&

changing &v3&

changing &v4& .

for display of four variables.

REPORT ZF140.

TABLES: ADRC ,T001.

FORM ADDR <b> tables in_tab structure itcsy

changing out_tab structure itcsy</b>.

SELECT SINGLE * FROM FROM ADRC WHERE ITAB-adrnr EQ ADRC-ADDRNUMBER.

IF sy-subrc = 0.

out_tab-value = adrc-NAME_1.

MODIFY out_tab INDEX 1 TRANSPORTING value.

out_tab-value = adrc-CITY1.

MODIFY out_tab INDEX 2 TRANSPORTING value.

out_tab-value = adrc-CITY2.

MODIFY out_tab INDEX 3 TRANSPORTING value.

out_tab-value = adrc-CITY_CODE .

MODIFY out_tab INDEX 4 TRANSPORTING value.

ENDIF.

ENDFORM.

Read only

0 Likes
873

hi

also please tell me how 2 declare the internal table...

vijay

Read only

Former Member
0 Likes
873

Hi Vijay ,

Use the select statement

SELECT NAME1 CITY1 CITY2 CITY_CODE

FROM ADRC WHERE ADDRNUMBER EQ ITAB-adrnr.

ENDSELECT.

Regards

Arun

Read only

0 Likes
873

hi

please ll me how to declare the itab table.

vijay

Read only

Former Member
0 Likes
873

Hi,

declare it as:

data: begin of i_adrc occurs 0,

name1 type adrc-name1,

city1 type adrc-city1,

city2 type adrc-city2,

city_code type adrc-city_code,

end of i_adrc.

and your select can be written as:

SELECT NAME_1 CITY1 CITY2 CITY_CODE

FROM ADRC

INTO TABLE I_ADRC

WHERE ADRC-ADDRNUMBER EQ ITAB-adrnr .

when you use "into table", Endselect is not required.

Reward points if helpful

Regards,

Divya.

Read only

0 Likes
873

hi

am getting unknown coloumn list NAME_1 as error...please help

vijay

Read only

0 Likes
873

Hi Vijay

In ADRC Name_1 Column is not there It is <b>Name1 </b>only not Name_1

<b>write Name1 instead of name_1</b>

Regards Rk

Read only

Former Member
0 Likes
873

hh