Table fileds
iam dispalying table fields data in the script ..
but iam getting the header data always . i mean for each row it is diaplaying the header filed also.
i wnat to diaplay a continuous data. is it possible to diaplay in that way.
help me pls..
Regards,
pandu.
Do it like this,
In your print program,
WRITE_FORM
WINDOW = 'MAIN'
ELEMENT = 'HEADER'
LOOP
WRITE_FORM
WINDOW = 'MAIN'
ELEMENT = 'ITEMS'
ENDLOOP
IN script
/:HEADER
write your headings
/:ITEMS
WRITE your item fields
Regards,
SaIRam
Similar Messages
-
How to add internal table fileds in Text module in smart forms
Hi Friends,
How to add internal table fileds in Text module in smart forms?
Thanks & Regards,
Vallamuthu.MHi Vallamuthu ,
how did you solve your problem?
thanks, -
Selecting table fileds in InfoSet query?
Hi Experts,
I have created an infoset query with two table. At the end selected field group as 'Key fields only'.
Can you please tell me how to manually select the fields from both tables so that I can build an InfoSet with the selected fields?
Thank you for you help!
Lakshmihi,
For manullay selecting the fields, Just drag and drop fields from respective tables ( left sub tree) to their
respective field groups( Right sub tree ) in a infoset.
If you wish to create your own field group, just delete the sytem created field group and then recreate it by giving suitable name and then again drag & drop fields from table to your field groups. -
Alter Fileds in an existing table
Hi to every body,
I have a doubt that if i want to edit filed names in already existing table i am getting an error that we cant alter table fileds
and so can any one help me in solving my problem
Regards,
SasiI created two tables namely:
1.ZBILLING
2.CUSTOMER
yes you are right i created VIEW "ZBILLCUST" by using this two tables and 1 common field "CNO"
but now i am trying to change another field but not CNO
but i am getting "Enhancement category" Missing error
as you said i am that particular table is used by view but i am not trying to change the common field and so i am not able to change the field name
Please help me to solve mp problem
Regards,
Sasi Vardhan -
Mapping data from internal table to SAPSCRIPT Box.
Hi Gurus,
I have to create a sapscript where in I should get data from standard tables and display the data in box (table format) in sapscript. I know how to get a field (perform in zprogram) into sapscript form zprogram. I dont know how I can get data (internal table) from my zprogram into sapscript and display in a box.
Your help is highly appreciated.Hi David,
consider the below example say if your zprogram having the internal table table loop and you want to print the contents line by line or in a box,
LOOP AT tj_1irg23d.
header line
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_HEADER1'
EXCEPTIONS
OTHERS = 1.
endloop.
then in your sap script main window or where ever you want to print just straight away give your internal table fileds as follows(just for example)
I2 ,,&J_1IRG23D-ZEILE(Z)&,,&J_1IRG23D-MATNR&,,&J_1IRG23D-CHAPID&,,
= &J_1IRG23D-MENGE(Z)&,,&J_1IRG23D-MEINS&,,0.0,,
then it will bring the values of your internal table in the form. -
Problem in changing(updating) the data in table control
Dear ABAP Experts,
I have a screen with 2 tables fields. 1st table(ZESTHEADER) fields are normal fields in the screen.
2 nd table fileds(ZESTDETAILS) are table control fields in the same screen .
Now i can update the 1st table fields(ZESTHEADER) succesfully But 2 nd table fields(ZESTDETAILS) are not at all updating. please review the below code and let me knwo where iam wrong.
FLOW LOGIC:
PROCESS BEFORE OUTPUT.
loop at itab1 with control VCONTROL CURSOR VCONTROL-CURRENT_LINE.
MODULE STATUS_0100.
endloop.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
loop at itab1.
endloop.
module mod1.
module user_exit.
CODE:
PROGRAM ZEST_HEADER2 message-id ymsg.
tables: zestheader,zestdetails.
data: itab like zestheader occurs 0 with header line.
data: itab1 like zestdetails occurs 0 with header line.
controls: vcontrol type tableview using screen '100'.
MODULE USER_COMMAND_0100 INPUT.
case sy-ucomm.
when 'ENTR'.
refresh itab.
select * from ZESTHEADER INTO ITAB where ESTMATE_NBR = ZESTHEADER-ESTMATE_NBR.
append itab.
endselect.
if itab is not initial.
refresh itab1.
SELECT * FROM ZESTDETAILS INTO table ITAB1 for all entries in itab wHERE ESTMATE_NBR = itab-ESTMATE_NBR.
select * from zestdetails INTO ITAB1 where ESTMATE_NBR = itab-ESTMATE_NBR.
append itab1.
endselect.
endif.
when 'UPDA'.
move zestheader to itab.
append itab.
update zestheader from table itab.
move-corresponding zestdetails to itab1.
update zestdetails from table itab1.
append itab1.
if sy-subrc eq 0.
message s002(ymsg).
else.
message e003(ymsg).
endif.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'ZESTCHNG'.
SET TITLEBAR 'ZESTCHNG2'.
MOVE-CORRESPONDING ITAB TO ZESTHEADER.
MOVE-CORRESPONDING ITAB1 TO ZESTDETAILS.
ENDMODULE. " STATUS_0100 OUTPUT
MODULE User_exit INPUT.
case sy-ucomm.
when 'EXIT'.
leave program.
endcase.
ENDMODULE. " User_exit INPUT
*& Module mod1 INPUT
text
MODULE mod1 INPUT.
ENDMODULE. " mod1 INPUTHi Ramesh,
For performance : Change the code.
1. select * from ZESTHEADER INTO table ITAB
where ESTMATE_NBR = ZESTHEADER-ESTMATE_NBR.
2. if itab is not initial.
refresh itab1.
SELECT * FROM ZESTDETAILS INTO table ITAB1
for all entries in itab wHERE ESTMATE_NBR = itab-ESTMATE_NBR.
append itab1. No need of append itab1 here.
3.This part i am not able to under stand.
when 'UPDA'.
move zestheader to itab.
append itab.
Above code by writing move zestheader to itab" how data will move from database table"
***In below code without loop how you are moving data to internal table itab1.
update zestheader from table itab.
move-corresponding zestdetails to itab1.
update zestdetails from table itab1.
append itab1.
if sy-subrc eq 0.
message s002(ymsg).
else.
message e003(ymsg).
endif.
I think you have not pasted full code -
can anybody explain both table & structure and difference between them.
How these are used to create the functional spec.both have fields in them but the main differnce is table can store data wheras structure can only take the data but can not store it
if u are running a programme and the moment programme ends all the value mentioned in structure vanish out whereas if u have mentioned tha data in table fileds they would have get stored in database even after programme ends
as the name suggest structure is a structure of a body but it has no soul means u it is created to avoid redundency
u can include a structure in table but u cant include a structure in a table
Edited by: Rahul Tyagi on Feb 26, 2008 3:51 PM -
Can i select Records from two tables into an itab.
Hi,
Suppose that i have two tables spfli and sflight.
Now i want the records from both the tables into a single internal table.
If so please let me know how this can be done.
itab should consist of all the columns in sflight and spfli.
Regards,
SaiSai,
Yes u can do it using JOINs.
Use this link for ref
http://www.sap-img.com/abap/inner-joins.htm
INNER JOIN results are an intersection of the tables being joined where in only if both the tables havethe data the result is pused onto the result set.
WHERE as in LEFT OUTR JOIN you can push the data of the LEF T table on the resultset even when the join condition is not met.
The use is that you wantto have all the data that is there in left table and also the right table if the join condition is a success then right table fileds will have data else they are initial.
OUTJOIN's are used in MAINTENANNCE VIEWS, HELP VIEWS .
INNER JOINS are used DATABSE VIEWS.
Inner Join:-
SELECT pcarrid pconnid ffldate bbookid
INTO CORRESPONDING FIELDS OF TABLE itab
FROM ( ( spfli AS p
INNER JOIN sflight AS f ON pcarrid = fcarrid AND
pconnid = fconnid )
INNER JOIN sbook AS b ON bcarrid = fcarrid AND
bconnid = fconnid AND
bfldate = ffldate )
WHERE p~cityfrom = 'FRANKFURT' AND
p~cityto = 'NEW YORK' AND
fseatsmax > fseatsocc.
Left Outer Join
SELECT scarrid scarrname p~connid
INTO CORRESPONDING FIELDS OF TABLE itab
FROM scarr AS s
LEFT OUTER JOIN spfli AS p ON scarrid = pcarrid AND
p~cityfrom = 'FRANKFURT'.
Reward if helpful,
Karthik -
Reading data from table on screen .
Hi
i have a 'Z' screen which contains table - i want to read the content of the table from screen beacuse some times the user fill the table fileds but doesnt press the ENTER key and the data he filled in the table on screen doesnt enter the internal table, is there a way to read table contant from screen ?
thanks
Eladhi eladush,
below is the master table contol program, hope its help you
<removed by moderator>
Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters to preserve formatting.
Edited by: Thomas Zloch on May 31, 2011 9:41 AM -
Hi All,
I have to create a custom table for sales dept. Can some one please give me the entire process to create a custom table.
Thanks,
Veni.Go to transaction SE11.
Enter table name as per naming conventions(it should start with z or y)
go to table fileds and enter the required filds, remeber to have mandt as first table field.
the enetr the key fields as per your requirement.
assign foreign keys as applicable.
create data elements and domains if required.(or craete them before craeting the table so that you can directly use)
finally after entring the all table filds activate it. -
Internal tables & select query for clasical report
hello all,
i am a novice in ABAP.i need to retrive data from 4 DB tables to do a classical report. i declared internal tables as below and then retrieved the data as per the below select statements. is there any other way in which i can do the same with a comparitively lesser amt of code.
data: begin of i_vbak occurs 0,
vbeln like vbak-vbeln,
kunnr like vbak-kunnr,
waerk like vbak-waerk,
end of i_vbak.
data: begin of i_vbap occurs 0,
vbeln like vbap-vbeln,
kwmeng like vbap-kwmeng,
posnr like vbap-posnr,
vrkme like vbap-vrkme,
netpr like vbap-netpr,
end of i_vbap.
data: begin of i_lips occurs 0,
vbeln like lips-vbeln,
vgpos like lips-vgpos,
vrkme like lips-vrkme,
lfimg like lips-lfimg,
end of i_lips.
data: begin of i_vbep occurs 0,
vbeln like vbep-vbeln,
posnr like vbep-posnr,
edatu like vbep-edatu,
end of i_vbep.
data: begin of i_out occurs 0,
kunnr like vbak-kunnr,
vbeln like vbak-vbeln,
kwmeng like vbap-kwmeng,
netpr like vbap-netpr,
waerk like vbak-waerk,
vrkme like vbap-vrkme,
lfimg like lips-lfimg,
posnr like vbep-posnr,
edatu like vbep-edatu,
end of i_out.
RETRIVING THE DATA INTO INTERNAL TABLE *
select vbeln kunnr waerk from vbak into table i_vbak where kunnr in
s_kunnr and vbeln in s_vbeln.
select vbeln kwmeng posnr vrkme netpr from vbap into table i_vbap for
all entries in i_vbak where vbeln = i_vbak-vbeln.
select vbeln vgpos vrkme lfimg from lips into table i_lips for all
entries in i_vbak where vbeln = i_vbak-vbeln and vgpos in s_vgpos.
select vbeln posnr edatu from vbep into table i_vbep for all entries in
i_vbak where vbeln = i_vbak-vbeln.
<b>Points are guaranteed for good answers.</b>
Thanks in advance
seenuHi,
If u will use in ALV means how many tables u want u can put it. After that u can maintain one internal table that's enough. Afterthat put select queries after that display the internal table fileds.
If u will ALV report means u have to code same coding for every report slight changes only there.
Herewith i am sending sample ALV REPORT it is useful for u.
REPORT CODING:
REPORT YMS_COLOURALV NO STANDARD PAGE HEADING.
TYPE-POOLS: SLIS, ICON.
DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: BEGIN OF IMARA OCCURS 0,
LIGHT(4) TYPE C,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
MAKTX TYPE MAKT-MAKTX,
COLOR_LINE(4) TYPE C,
TCOLOR TYPE SLIS_T_SPECIALCOL_ALV, "cell
END OF IMARA.
DATA: XCOLOR TYPE SLIS_SPECIALCOL_ALV.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM WRITE_REPORT.
Get_Data
FORM GET_DATA.
WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'ABC'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for ABC'.
APPEND IMARA.
WRITE ICON_YELLOW_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'DEF'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for DEF'.
APPEND IMARA.
WRITE ICON_RED_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'GHI'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for GHI'.
APPEND IMARA.
LOOP AT IMARA.
IF SY-TABIX = 1.
IMARA-COLOR_LINE = 'C410'. " color line
ENDIF.
IF SY-TABIX = 2. " color CELL
CLEAR XCOLOR.
XCOLOR-FIELDNAME = 'MTART'.
XCOLOR-COLOR-COL = '3'.
XCOLOR-COLOR-INT = '1'. " Intensified on/off
XCOLOR-COLOR-INV = '0'.
APPEND XCOLOR TO IMARA-TCOLOR.
ENDIF.
MODIFY IMARA.
ENDLOOP.
ENDFORM. "get_data
WRITE_REPORT
FORM WRITE_REPORT.
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.
LAYOUT-COLTAB_FIELDNAME = 'TCOLOR'.
LAYOUT-INFO_FIELDNAME = 'COLOR_LINE'.
PERFORM BUILD_FIELD_CATALOG.
CALL ABAP LIST VIEWER (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
TABLES
T_OUTTAB = IMARA.
ENDFORM. "write_report
BUILD_FIELD_CATALOG
FORM BUILD_FIELD_CATALOG.
DATA: FC_TMP TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
CLEAR: FIELDCAT. REFRESH: FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Status'.
FC_TMP-FIELDNAME = 'LIGHT'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '4'.
FC_TMP-ICON = 'X'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material Number'.
FC_TMP-FIELDNAME = 'MATNR'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '18'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material Type'.
FC_TMP-FIELDNAME = 'MTART'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '10'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material'.
FC_TMP-FIELDNAME = 'MAKTX'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '40'.
FC_TMP-EMPHASIZE = 'C610'. " color column
APPEND FC_TMP TO FIELDCAT.
ENDFORM. "build_field_catalog
Thanks,
Shankar -
How to build a internal table of field symbols.
Hi,
I want to build a internal table, which consists of several field symbols. Each field symbol points to an entry of other internal tables. All of these tables have different structure definition. How can I implement it. If it is possible, it can save a lot of table query time.
I will be very appreciate for your help.
Best Regards, Junhello jun
i hope the following example give the some idea to build internal table fileds with differen field symbol data types.
FIELD-SYMBOLS:<f1> type any,<f2> TYPE ANY.
data:BEGIN OF itab,
t1 type i value 10,
t2(30) type c value 'john',
t3 type p DECIMALS 3 value '4.7658',
END OF itab.
ASSIGN itab to <f1>.
DO 3 TIMES.
ASSIGN COMPONENT sy-index OF STRUCTURE <f1> TO <f2>.
WRITE <f2>.
ENDDO.
types:begin of it_line,
i1 type i,
t1 type string,
p1 type p DECIMALS 3,
end of it_line.
data:itab1 type table of it_line.
FIELD-SYMBOLS:<f1>.
ASSIGN itab1 to <f1>.
and also u can refer the following links
1-> http://help.sap.com/saphelp_wp/helpdata/en/fc/eb387a358411d1829f0000e829fbfe/content.htm
2--> http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3923358411d1829f0000e829fbfe/content.htm
Thanks&Regards
sreenivas p -
Help for "insert data to variable tables"
hi, guys.
I want to make a tool to upload mass-data then insert the data to tables of SAP for integrative test.
for example, to input the object tablename "AAAA" from screen, the program willl find the information of this table then input the data to the "AAAA" tables.
But i have no idea how to define the internal table to suit various tables ( by define dynamic table? or any other ways) ,could you kindly give me some advice?
thanks a lot in advance.
Message was edited by:
huijuan zhaohi zhao,
welcome to sdn,
for your requirement u can use bdc to upload file to internal table then u can update these internal table fileds to sap tables.
or
use <b>gui_upload</b> function module to upload data to internal table then u can use just <b>insert</b> keyword to update sap tables.
see this sample code to update the database table <b>edpar</b>,
report zsd_edpar_update no standard page heading.
*&Purpose:
*& program will be used to update EDAPR table on a daily basis.
*& This update will be based on Customer Sold To / Ship To partner
*& functions assignment. Ship To customer(s) will be linked to
*& the appropriate Sold To customer using the ?Acct at Cust?
*& number as a reference. Then, Ship To customer(s) will be
*& set up withthe appropriate partner function with the Sold
*& To customer.it updated the DB tabel and gives the information
*& of customer level visibility t account receivable.
*define database tables...
tables: edpar,
knvv,
knvp.
*define types...
types: begin of t_tab_edpar,
mandt type mandt,
kunnr type kunnr,
parvw type parvw,
expnr type edi_expnr,
inpnr type edi_inpnr.
types: end of t_tab_edpar.
types: begin of t_tab_knvv,
kunnr type kunnr,
vkorg type vkorg,
vtweg type vtweg,
spart type spart,
eikto type eikto.
types: end of t_tab_knvv.
types: begin of t_tab_knvp,
kunnr type kunnr,
vkorg type vkorg,
vtweg type vtweg,
spart type spart,
parvw type parvw,
kunn2 type kunn2.
types: end of t_tab_knvp.
type-pools: slis.
*define data statments...
data: g_tab_edpar type standard table of t_tab_edpar,
g_wa_edpar like line of g_tab_edpar.
data: g_tab_edpar1 type standard table of t_tab_edpar,
g_wa_edpar1 like line of g_tab_edpar1.
data: g_tab_edpar2 type standard table of t_tab_edpar,
g_wa_edpar2 like line of g_tab_edpar2.
data: g_tab_knvv type standard table of t_tab_knvv,
g_wa_knvv like line of g_tab_knvv.
data: g_tab_knvp type standard table of t_tab_knvp,
g_wa_knvp like line of g_tab_knvp.
data: repid like sy-repid,
l_tab_fieldcat type slis_t_fieldcat_alv,
l_tab_fieldcat1 type slis_t_fieldcat_alv,
l_tab_fieldcat2 type slis_t_fieldcat_alv,
layout type slis_layout_alv,
events type slis_t_event,
events1 type slis_t_event,
wa_events like line of events,
l_pos type i.
*selection screen...
selection-screen begin of block b1 with frame title text-001.
select-options: s_cust for knvv-kunnr obligatory,
s_sorg for knvv-vkorg,
s_dcha for knvv-vtweg,
s_divi for knvv-spart,
s_parf for knvp-parvw.
selection-screen end of block b1.
*start-of-selection...
perform get_data.
*to update the db table edpar...
perform update_edpar.
*display alv block...
perform alv_block.
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
select kunnr
vkorg
vtweg
spart
parvw
kunn2
from knvp
into table g_tab_knvp
where
kunnr in s_cust
and
vkorg in s_sorg
and
vtweg in s_dcha
and
spart in s_divi
and
parvw in s_parf.
loop at g_tab_knvp into g_wa_knvp.
move: g_wa_knvp-kunnr to g_wa_edpar-kunnr,
g_wa_knvp-kunn2 to g_wa_edpar-inpnr,
g_wa_knvp-parvw to g_wa_edpar-parvw.
append g_wa_edpar to g_tab_edpar.
endloop.
if not g_tab_knvp[] is initial.
select kunnr
vkorg
vtweg
spart
eikto
from knvv
into table g_tab_knvv
for all entries in g_tab_knvp
where
kunnr eq g_tab_knvp-kunnr
and
vkorg eq g_tab_knvp-vkorg
and
vtweg eq g_tab_knvp-vtweg
and
spart eq g_tab_knvp-spart.
loop at g_tab_knvp into g_wa_knvp .
sort g_tab_knvv by kunnr.
clear g_wa_knvv-eikto.
read table g_tab_knvv into g_wa_knvv with key kunnr = g_wa_knvp-kunnr.
if sy-subrc eq 0.
move: g_wa_knvv-eikto to g_wa_edpar-expnr.
modify g_tab_edpar from g_wa_edpar transporting expnr where kunnr eq g_wa_knvp-kunnr.
endif.
endloop.
endif.
sort g_tab_edpar by kunnr.
delete adjacent duplicates from g_tab_edpar comparing kunnr parvw.
endform. " get_data
*& Form update_edpar
text
--> p1 text
<-- p2 text
form update_edpar .
delete from edpar." FROM TABLE g_tab_delete.
call function 'DB_COMMIT'.
loop at g_tab_edpar into g_wa_edpar.
insert into edpar values g_wa_edpar.
if sy-subrc eq 0.
move-corresponding g_wa_edpar to g_wa_edpar1.
append g_wa_edpar1 to g_tab_edpar1.
else.
move-corresponding g_wa_edpar to g_wa_edpar2.
append g_wa_edpar2 to g_tab_edpar2.
endif.
endloop.
reward points if helpful,
regards,
seshu. -
I am new to HR-ABAP
i want to avoid this macro
rp-provide-from-last p0000 space pn-begda pn-endda.
plz send how to write code , with this place.
2. i want to move one internal table fileds to another table
but i do not use move-corresponding ? how plz send code1. to avoid the macro, here is exact code which works behind that macro.
SORT P0000.
PNP-SW-FOUND = '0'.
CLEAR PNP-SY-TABIX.
LOOP AT P0000.
IF P0000-BEGDA LE PN-ENDDA AND P0000-ENDDA GE PN-ENDDA.
PNP-SW-FOUND = '1'.
EXIT.
ENDIF.
IF P0000-BEGDA LE PN-ENDDA AND P0000-ENDDA GE PN-BEGDA.
PNP-SY-TABIX = SY-TABIX.
ENDIF.
ENDLOOP.
IF PNP-SW-FOUND EQ '0'.
IF PNP-SY-TABIX NE 0.
PNP-SW-FOUND = '1'.
READ TABLE P0000 INDEX PNP-SY-TABIX.
ELSE.
CLEAR P0000.
ENDIF.
ENDIF.
2. To assign an internal table to another without move coresponding, just copy like this:
it_new[] = it_old[]. -
To download the Output of ALV to Excel file with Marco
Hello Masters ,
I m working on a ALV report in which either we can see the output or can download the ouptput and format that file before sending by mail..
the following steps are currently used to download and format the ALV output .
1. Save file form unix server
2. Download the file to computer.
3. Run a macro to format the execl file and
4. Send the file by mail.
Apart from this I have to implement a new functionality by which we can directly send the result to spool so that it can be sent directly by mail .
Can Anyone help me out????????
Thanks & Regards
Varlani AmitYou will be having all data to be send in an internal table, same as your ALV internal table.
you can provide a button or menu in alv screen to send directly without storing.
for this you
1. first write spool
2. send it through mail.
1. Writting a spool
*Get the printer name from TVARVC table.
select single low from tvarvc into l_destination
where name = 'PRINTER'
and type = 'P'
and numb = '0000'.
if sy-subrc ne 0.
l_destination = 'LOCL'.
endif.
*Get the print parameters.
call function 'GET_PRINT_PARAMETERS'
EXPORTING
copies = 1
department = 'SYSTEM'
destination = l_destination
expiration = 2
immediately = ' '
layout = 'X_65_255'
line_count = 65
line_size = 255
list_name = 'ABC'
list_text = 'XYZ
mode = ' '
new_list_id = 'X'
no_dialog = 'X'
receiver = 'SAP*'
release = 'X'
sap_cover_page = 'X'
user = sy-uname
IMPORTING
out_parameters = l_params
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
case sy-subrc.
when 1.
raise get_print_info_not_found.
when 2.
raise get_print_invalid_prt_params.
when 3.
raise get_print_invalid_arch_params.
when 4.
raise get_print_others.
endcase.
*start spool writing.
new-page print on parameters l_params no dialog.
uline.
skip.
write: 27 text-022 centered. "report name
skip.
uline.
Do formatting as you want.
loop at ALV_OUTPUT_INTERNAL TABLE..
write:/ ALV_OUTPUT_INTERNAL TABLE-fileds...
endloop.
uline.
*end spool writing.
new-page print off.
2. Sending a mail.
Use FM 'SO_DOCUMENT_SEND_API1' for sending a mail
Maybe you are looking for
-
How to save data from text file in databse for a transaction...
Hi Guys, I have a text file which has some data related relevant to transaction VA01 separated by tabs. Now instead of going in the transaction in VA01 and thne feeding the data manually, I would like this data to get read automatically from the text
-
How do I connect speakers to ipod
Recently purchased Harmon Kardon Soundsticks I second hand, and an ipod dock. Both have a USB port how do I connect the two together? I am female and not very good with electrical goods!!!! Windows XP
-
890GXM-G65 AM3+/black socket
Hi all. Just wanted to know if the 890GXM-G65 will be getting a black socket/AM3+ revision in the near future...since it is certified AM3+ but the one on the site still has a white/AM3 socket (BD/FX chips won't fit). Thanks.
-
hi guys, I am getting OPEN DATASET SHORTDUMP using below code. can somebody suggest me alteration of code.. Dump says error in READ statement. DATA : BEGIN OF IT_EDIT OCCURS 0, CNO(5) TYPE C, DATE(8) TYPE C,
-
Printer won't quit after printing
After I print anything from my eMac to the HP laser printer it is hooked up to, the printer icon stays in the dock with the little arrow under it showing that it is open. It won't quit automatically; I have to manually go in and quit the printer. I t