‎2007 Apr 23 8:09 AM
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
‎2007 Apr 23 8:17 AM
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
‎2007 Apr 23 8:19 AM
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
‎2007 Apr 23 8:23 AM
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.
‎2007 Apr 23 8:28 AM
hi
also please tell me how 2 declare the internal table...
vijay
‎2007 Apr 23 8:23 AM
Hi Vijay ,
Use the select statement
SELECT NAME1 CITY1 CITY2 CITY_CODE
FROM ADRC WHERE ADDRNUMBER EQ ITAB-adrnr.
ENDSELECT.
Regards
Arun
‎2007 Apr 23 8:33 AM
‎2007 Apr 23 8:39 AM
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.
‎2007 Apr 23 8:46 AM
hi
am getting unknown coloumn list NAME_1 as error...please help
vijay
‎2007 Apr 23 9:39 AM
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
‎2007 May 10 7:23 AM