Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAP to SAS system data transfer

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.

Tags:
replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question