01-23-2009 2:28 AM
hi ,
im developing an interface program, my requirement is the interface file should be picked from application server in background from specific location at a certain time daily .is it possible how to do . any help will be appreciated
thanks to all
01-23-2009 2:31 AM
it is possible the solution has been posted many times in Forum please SEARCH
Reported!!
01-23-2009 2:31 AM
it is possible the solution has been posted many times in Forum please SEARCH
Reported!!
01-23-2009 2:49 AM
thanks j@y for suggestion.
im searching for that in scn could not find the post regarding the requirement, then only i post it . please can u give me the links for this in scn i couldnt find . your kind help will be appreciated .
01-23-2009 2:54 AM
[Search |https://forums.sdn.sap.com/click.jspa?searchID=21345195]
01-23-2009 3:01 AM
01-23-2009 3:12 AM
01-23-2009 3:21 AM
HI,
You need to use the OPEN DATASET, READ DATASET & CLOSE DATASET to upload the data from application server to internal table and do processing as per your rquirement.
If you want to have upload the data timely..schedule the Report program as job.
01-23-2009 2:32 AM
01-23-2009 2:33 AM
GUi_upload is for NOT for application server....
Open dataset is the key word to search..
01-23-2009 2:34 AM
01-23-2009 3:28 AM
in one of my requirement, the functional guys has look after the scheduling the back ground job etc. stuff......so, i guess, just u need to write the prog, by using the above key words, then the functional team will schedule it, u need not worry abt it, better keep the application server path as parameter on the selection screen, and make sure that, the file shuld over write each time ión UNIX(if its a regular job).
thanq
01-23-2009 3:35 AM
01-23-2009 1:21 PM
Hi First,, start codeing form the input you got in the forum.. in the process if any thing stops you search the forum for the solution if you dont find then get back with a Question.
If you got enough info close the thread...
01-23-2009 1:38 PM
Hi,
You can also define the aplication server path using the transaction FILE.
Kind regards
Åsa Thenstedt
01-23-2009 3:39 AM
hi
When scheduling a job in the background the appropriate statement to read in your file is OPEN DATASET, and the file must be on the file system that the SAP server can see.
At anytime, a user can switch of the Personal Computers even though the job is still running in the background. Therefore GUI_* and WS_* function modules are not designed to work in that way, as they need to access your personal computer file.
To choose the correct download method to used, you can check the value of SY-BATCH in your code,
if it is 'X' use OPEN DATASET and if it is ' ' use WS_UPLOAD.
*-- Open dataset for reading
DATA:
dsn(20) VALUE '/usr/test.dat',
rec(80).
OPEN DATASET dsn FOR INPUT IN TEXT MODE.
IF sy-subrc = 0.
DO.
READ DATASET dsn INTO rec.
IF sy-subrc <> 0.
EXIT.
ELSE.
WRITE / rec.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET dsn.
*-- Open dataset for writing
DATA rec(80).
OPEN DATASET dsn FOR OUTPUT IN TEXT MODE.
TRANSFER rec TO '/usr/test.dat'.
CLOSE DATASET dsn.
*And*
*You need to do following this thing also*
Create a file in AL11 ( By using CG3Y / CF3Z Transaction ) , Then it it will create a file in AL11->Home.**
In your code upload this file by using OPEN DATASET etc syntaxe**
Regard
nawa
01-23-2009 4:20 AM
Hi ,
Could u check this program , hope use full for u.
OPEN DATASET file IN TEXT MODE ENCODING DEFAULT FOR INPUT.
DO .
READ DATASET FILE INTO ITAB.
APPEND ITAB.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
LOOP AT ITAB.
REFRESH JTAB.
PERFORM SUB USING 'ZVIF' '0100'.
PERFORM SUB1 USING:'LFA1-LIFNR' ITAB-LIFNR,
'LFA1-NAME1' ITAB-NAME1,
'LFA1-LAND1' ITAB-LAND1.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'ZVIF'
TABLES
DYNPROTAB = JTAB.
ENDLOOP.
ENDDO.
CLOSE DATASET FILE.
Regard's
Shaik.
10-28-2019 2:25 AM
Hi,
Here is a sample abap program for extract data from custom table and download to a file on server for your reference.
The ZUSR02 is a view created from USR02. You can changed the code for reading different for testing.
Regards,
Billy
----------------------------------------------------------------------
Sample ABAP Program:
----------------------------------------------------------------------
REPORT ZBCDATEXTRACT01.
TABLES:ZUSR02.
DATA HEADER(255).
DATA: BEGIN OF ITAB OCCURS 0,
CLIENT like ZUSR02-CLIENT,
BNAME like ZUSR02-BNAME,
USTYP like ZUSR02-USTYP,
UFLAG like ZUSR02-UFLAG,
TRDAT like ZUSR02-TRDAT,
PWDLGNDATE like ZUSR02-PWDLGNDATE,
LOCNT like ZUSR02-LOCNT,
GLTGV like ZUSR02-GLTGV,
GLTGB like ZUSR02-GLTGB,
END OF ITAB.
DATA: ZSYSID(3) type C.
DATA: ZBNAME(12) type C.
DATA: ZUSTYP(1) type C.
DATA: ZUFLAG(3) type C.
DATA: ZTRDAT(8) type C.
DATA: ZPWDLGNDATE(8) type C.
DATA: ZLOCNT(3) type C.
DATA: ZGLTGV(8) type C.
DATA: ZGLTGB(8) type C.
DATA: ZCLIENT(3) type C.
DATA: wa_itab like line of ITAB.
DATA: v_record(255) TYPE C.
PARAMETERS: OUTFILE(60) DEFAULT 'R:\usr\sap\UD2\DVEBMGS12\data\ZBCDATASET01.txt' LOWER CASE.
PARAMETERS: ZPAR2 DEFAULT ';' LOWER CASE.
CONCATENATE 'SYSTEM_ID' 'ZUSR02-CLIENT' 'ZUSR02-BNAME' 'ZUSR02-USTYP' 'ZUSR02-UFLAG' 'ZUSR02-TRDAT' 'ZUSR02-PWDLGNDATE' 'ZUSR02-LOCNT' 'ZUSR02-GLTGV' 'ZUSR02-GLTGB' INTO HEADER SEPARATED BY ZPAR2.
ZSYSID = SY-SYSID.
OPEN DATASET OUTFILE FOR OUTPUT IN TEXT MODE encoding UTF-8.
SELECT * FROM ZUSR02 INTO CORRESPONDING FIELDS OF TABLE ITAB.
TRANSFER HEADER TO OUTFILE.
LOOP AT ITAB into wa_itab.
ZUFLAG = wa_itab-UFLAG.
ZLOCNT = wa_itab-LOCNT.
CONCATENATE ZSYSID wa_itab-client wa_itab-BNAME wa_itab-USTYP ZUFLAG wa_itab-TRDAT wa_itab-PWDLGNDATE ZLOCNT wa_itab-GLTGV wa_itab-GLTGB into v_record separated by ZPAR2.
TRANSFER v_record TO OUTFILE.
ENDLOOP.
CLOSE DATASET OUTFILE.
10-28-2019 2:29 AM
11-06-2019 2:01 AM
Application tables for FI
Accounts Recievables
1. BSID - Customer Open Items
2. BSAD- Customer cleared items.
Accounts Payables
1. BSIK - Vendor Open Items
2. BSAK- Vendor cleared items.
Vendor Master : LFA1, LFB1, LFBK, LFBW,ADRC, ADR6
Customer Master : KNA1, KNB1, KNBK ( KN*)
Payment : REGUP, REGUH, RAGUV ( REGU*), PAYR
Documents : BKPF, BSEG, BSIS, BSAD, BSAK