BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AhmedAccordBGro
Fluorite | Level 6

How to write to SAP R/3 Table using SAS/ACCESS or Data Surveyor?

 

I'm using data surveyor, and I was able to access SAP R/3 tables, import the metadata, and create SAS datasets to host the SAS tables.

 

Now, I need to write back to SAP, any ideas how to perform so?

 

BTW, using simple table loader transformer giving errors like:

ERROR: SQL Passthru is not supported
ERROR: Update access is not supported for file ECCLIB.MSEG.DATA.

1 ACCEPTED SOLUTION

Accepted Solutions
LouGalway_sas
SAS Employee

Ahmed,

 

Writing data back to r/3 is not the same as writing to a database because r/3 is an ERP system.  I recommend working with your SAP team to determine if the table you want to write to can be updated.  If the table can be updated do you have permission to write to that table?  Based on the table you will also have to find an appropriate BAPI that will allow you to write to the table you want to update.  Once you have this information you can create a job in SAS Data Integration Studio (part of SAS Data Surveyor for SAP) using the SAP Transformation to call the BAPI and pass the updated data to the desired table.  In the properties of the of the SAP Transformation you will name the appropriate BAPI.  The transformation can have inputs and outputs based on the BAPI named in the SAP Transformation.  For example, the BAPI "BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 " can be used to update planning data in a planning book in SAP.

 

Using the SAP Tranformation uses the PROC CALLRFC in code.  Here are some details about PROC CALLRFC https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=accr3&docsetTarget=n0x...

 

I hope this helps you.

Regards,

Lou Galway

View solution in original post

1 REPLY 1
LouGalway_sas
SAS Employee

Ahmed,

 

Writing data back to r/3 is not the same as writing to a database because r/3 is an ERP system.  I recommend working with your SAP team to determine if the table you want to write to can be updated.  If the table can be updated do you have permission to write to that table?  Based on the table you will also have to find an appropriate BAPI that will allow you to write to the table you want to update.  Once you have this information you can create a job in SAS Data Integration Studio (part of SAS Data Surveyor for SAP) using the SAP Transformation to call the BAPI and pass the updated data to the desired table.  In the properties of the of the SAP Transformation you will name the appropriate BAPI.  The transformation can have inputs and outputs based on the BAPI named in the SAP Transformation.  For example, the BAPI "BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 " can be used to update planning data in a planning book in SAP.

 

Using the SAP Tranformation uses the PROC CALLRFC in code.  Here are some details about PROC CALLRFC https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=accr3&docsetTarget=n0x...

 

I hope this helps you.

Regards,

Lou Galway

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 869 views
  • 1 like
  • 2 in conversation