09-09-2008 9:07 AM
Hello All......
I am having a reuirment as transfering the SAP data to SAS system. SAS system is having orical data base.
Connecting the external system and inserting the data directly to the SAS orical data base and the disconnecting the system.
I am using below code for updating the data.
EXEC SQL.
CONNECT TO : dbcon
ENDEXEC.
EXEC SQL.
INSERT INTO S_t001
(mandt, bukrs)
VALUES
(wa_t001-mandt, wa_t001-bukrs);
ENDEXEC.
EXEC SQL.
DISCONNECT :dbcon
ENDEXEC.
Please let me know. it would work or not. Please let me know if any other soultion is there................
Thanks,
Feroz.
09-09-2008 9:46 AM
>
> Please let me know. it would work or not. Please let me know if any other soultion is there................
>
> Thanks,
> Feroz.
Why not try it and see? On the face of it, it looks ok.
09-09-2008 9:46 AM
>
> Please let me know. it would work or not. Please let me know if any other soultion is there................
>
> Thanks,
> Feroz.
Why not try it and see? On the face of it, it looks ok.
09-09-2008 9:56 AM
I am getting an error as An SQL error has occurred : ORA-00911: Invalid Character.
This means table is not been created in SAS systerm or any other parameter need to be passed??????
09-09-2008 10:27 AM
Why didn't you say so in the first place?
Anyway. You're syntax seems to be wrong. ABAP variables need to be preceded with a colon :
Also, you have : dbcon There shouldn't be a space. See this from SAP HELP.
PARAMETERS: p_carrid TYPE spfli-carrid,
p_connid TYPE spfli-connid.
DATA: BEGIN OF wa,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
END OF wa.
EXEC SQL.
SELECT cityfrom, cityto
INTO :wa
FROM spfli
WHERE carrid = :p_carrid AND connid = :p_connid
ENDEXEC.