Inserting row in DB4 From SAP / ABAP
Hi experts.
I'm facing a problem during the insertion of new rows on DB4 from data commng from SAP.
I have already configured TXN DBCO using next parameters:
AS4_HOST=XXXXXX;AS4_DB_LIBRARY=FILEAMP;AS4_QAQQINILIB=FTS000;
Using program ADBC_TEST_CONNECTION for testing is working fine.
I have created a test program for query and then insert a new row on table FTS000 but que query also workfine, it show the data that exists in the table. But when I´m trying to insert a new row it´s not working.
The error message es: An SQL error has occurred: FTS000 in FILEAMP not valid for operation. MSGID=CPF9898 Job=072969/DE1ADM/XDNDEV0000
I´m using next ABAP CODE
try.
S10039BD.
:wa_fts000-PERNR
EXEC SQL.
INSERT INTO FTS000 (PERNR, USRREG, FECREG, HORREG, BUKRS, BEGDA, ENDDA, MASSN, MASSG)
VALUES ( '00000034', 'ABAP06', '20120112', '121212', '3100', '20120130', '20120130', 'xx', 'yy' )
ENDEXEC.
catch cx_sy_native_sql_error into exc_ref.
error_text = exc_ref->get_text( ).
message error_text type 'I'.
endtry.
On DB4
5761SS1 V6R1M0 080215 Imprimir información SQL Paquete SQL QTEMP/AS4EXTRA0G 01/24/12 16:12:53 Page 001
Nombre de objeto..........QTEMP/AS4EXTRA0G
Tipo de objeto............*SQLPKG
CRTSQL***
PGM(QTEMP/AS4EXTRA0G)
SRCFILE( / )
SRCMBR( )
COMMIT(*CHG)
OPTION(*SYS *NOEXTIND *PERIOD)
TGTRLS(*PRV)
ALWCPYDTA(*OPTIMIZE)
CLOSQLCSR(*ENDPGM)
DECRESULT(31 31 0)
STATEMENT TEXT CCSID(819)
STATEMENT NAME: JFKEHDABLJAEIAAB
INSERT INTO FTS000 ( PERNR , USRREG , FECREG , HORREG , BUKRS , BEGDA , ENDDA ,
MASSN , MASSG ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ? )
SQL5065 Plan de acceso no encontrado
Can any one help me about the problem.
Thanks in advanced for your help.
I assume that file FILEAMP/FTS000 is not journaled. The default isolation level for an INSERT operation is "WITH UR", and if the file (table) is not journaled, the operation is failing.
You can either start journaling for the file (command: STRJRNPF), or you can perform the INSERT operation without commitment control by adding "WITH NC" to the end of the statement.
Kind regards,
Christian Bartels.
Similar Messages
-
Create a table and upload data in MS ACCESS from SAP ABAP programming?
Hi All,
How to create a table in MS ACCESS database and Upload SAP database table data into MS ACCESS table using ABAP programming?
Explain: My client requirement is " If he/she runs a ABAP Program, that will create a table and upload data into MS ACCESS Database table in background. "
Could you please give the solution or code? I know the program RIACCESS and I went through the SAP Note 583698.
Is this only solution for this? Or Any other possibilities?
Please give me solution.
Thanks in advance.Hi,
It is not possible to create tables in a non SAP schema from inside SAP.
The SAP-Oracle license also does not allow you to create the table (see note 581312):
the following actions, among other things, are therefore forbidden at database level:
Creating database users
Creating database segments
Querying/changing/creating data in the database
Using ODBC or other SAP external access methods
Please refer following link,
[Ckick Here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
You can also do it by LSMW,
If you are using Access 97, you can download directly into an access
database from SAP. See program RIACCESS for details. You have to establish
an RFC destination PS_ACCESS_1 and 2.
There are then a couple of function modules. Go to SE37 and put in
msaccess and hit PF4.
The following is from the readme file: sapgui/ps/readme.sap
For the MS-Access interface SAP delivers 4 files:
WDPSASTR.EXE This is an RFC server program that is called by SAP R/3
(PS module). This program creates a MS Access database. The structure
information of the tables is transferred from R/3. In addition to
these tables a table named DDIC is created. This table contains the
structure information and should in no case be modified or deleted.
WDPSATAB.EXE This is an RFC server program that is called by SAP R/3
after WDPSASTR. This program filles the tables of the database with data.
There must not be made any changes of the structure of
the tables between the calls of WDPSASTR and WDPSATAB.
WDPSAZET.EXE This is an RFC client program that triggers work/time
confirmations in the PS module of SAP R/3 (like transaction CN27 Collectiv
confirm).
WDPSAMAT.EXE This is an RFC client program that triggers material
confirmations in the PS module of SAP R/3 (like transaction MB1A - Goods
Please also refer following links,
[Click here|Upload data from MS Access tables, to SAP tables.;
Before using the program "RIACCESS", you need to install the PS utilities, which are part of SAPGUI install CD.
It is available in the "SAPGUIPS directory".
Then do the followings :
1. Select transaction code SALE -> Systems in network-> Define RFC Destination.
2. You will need two RFC destinations (TCP/IP connections for the front-end workstation).
Setup the two RFC destinations PS_ACCESS_1 and PS_ACCESS_2 and you'll have to get them to point to
wdpsastr.exe and wdpsatab.exe respectively.
3. Then execute RIACCESS and choose PS_ACCESS_1 to generate access tables.
The system must also be able to access the RFC-DLL files (librfc2.dll, librfc3.dll, librfc4.dll, librfc5.dll, librfc6.dll, vrfc.dll).
Please note that Access only supports tables with up to 255 fields. -
From SAP ABAP to SAP FICO consultant
Hi Experts,
Hope you all are doing good in your area.
I want your guidance for my sap career ahead .
I have 4 years of experience in SAP as an certified ABAP Consultant.
With this year of experience I have worked on technical developments of SAP PP/MM/FICO/SD modules.
Now I want to move as an Functional Consultant for FICO module .
I had started working on the same.
But my doubt is whether I can go ahead as SAP FICO(ABAP) consultant .
I have programming background ,PG in Computer Application.
What are recruiters criteria for the same .
Can I go ahead as SAP techno functional consultant (ABAP/FICO).
Need your guidance .
Regards,
Jeethi Jeetendra,
I definitely see no harm in trying to be a FICO Consultant who knows ABAP (or vice-versa). I've seen some really crazy requirements come from recruiters and this combination was one of them.
Just to give you an idea, I've recruiters asking for ABAP with BASIS, ABAP with SOA experience, ABAP with SCM, ABAP with PP-DS, ABAP with SLT etc apart from clubbing ABAP with any of the core Functional Modules.
So yeah, if FICO is your "thing" and you think it will be a cake-walk then go for it.
pk -
Sending mail to an external mailid from SAP ABAP with formatting
Hi,
I am using so_object_send to send an email from the abap program the issue is i need to send the email text as formatted one that is some text in bold and higher fontsize compared to other how can i do the same is their any other function
Regards
Gopi krishnaHi gopi,
Check this link,
http://www.sap-img.com/fu016.htm
These are the FM for sending external email :-
SO_DOCUMENT_SEND_API1
SAPoffice: Send new document with attachments via RFC
SO_NEW_DOCUMENT_ATT_SEND_API1
(In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
SAPoffice: Send new document with attachments via RFC
Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject.
SO_NEW_DOCUMENT_SEND_API1
SAPoffice: Send new document
Hope this helps u.
Kindly reward points to the useful answer.
Thanks&Regards,
Ruthra.R -
Add Voting buttons in MS Outlook from SAP ABAP program
I have a requirment where SAP ABAP program will send an email.
I need to have the voting buttons (yes/no) in the email. It does not have to be in the content of the email but the typically voting buttons that we can add to the MS Outlook email.
If there is someone who can give me the steps and documentations, greatly appreciate.
The main critieria is that it has to be MS outlook.Hi,
here is the solution i think.
INCLUDE ole2incl .
DATA: ole_outlook TYPE ole2_object,
ole_CItem TYPE ole2_object,
ole_body TYPE string.
CREATE OBJECT ole_outlook 'Outlook.Application'.
CALL METHOD OF ole_outlook 'CreateItem' = ole_CItem
EXPORTING #1 = 0.
SET PROPERTY OF ole_CItem 'To' = 'receiver @ mail.com'.
SET PROPERTY OF ole_CItem 'Subject' = 'E-mail Title'.
CALL METHOD OF ole_CItem 'Display'.
CONCATENATE ole_body
'Dear Sir/Madam,'
cl_abap_char_utilities=>newline
cl_abap_char_utilities=>newline
INTO ole_body.
SET PROPERTY OF ole_CItem 'Body' = ole_body.
CALL METHOD OF ole_CItem 'ATTACHMENTS' = ATTS.
CALL METHOD OF ATTS 'ADD'
EXPORTING #1 = 'C:\File_Location\File_name.extension'.
SET PROPERTY OF ole_CItem 'VotingOptions' = 'Yes;No'.
FREE OBJECT ole_outlook.
*you can replace the voting option to what you want, for example 'Yes;No' or 'Approve;Reject'. -
Error in Posting the data from SAP ABAP Progra,
Hi,
I am sending sap data from ABAP Program,
I called RFC in the Function Module and given the RFC Destination,
While I am Executing it is going to short Dump.
Data is not posting.
Points will be awarded.
Regards,
Jayasimha.Dear jaya,
execute FM once without RFC destination.
now collect the data in intermediate variable.
now execute FM with RFC destaination passing collected data as input.
second RFC is genrally treated as dummy which is used only for sending data to XI,it doesnt do any "function" as such.
this should solve your problem gurnteed.
if you still find short dump please paste your abap code,ll get back to you.
reason for short dump:
record set is high and executing module at remote system at a stretch doesn't work sometimes.
Thanks & Regards,
Rama Krishna -
How do i call web services from SAP ABAP
Hello,
Ian working with .net team. they are using sap .net Connector to connect SAP. But my job is In SAP side when Purchase Requisition is created, I have to call web services from ABAP and i have to pass the Purchase Requisition number to web service(.net Program). Please help me how to call web services from ABAP and how to pass value. Any one help me with example.
Thanks
RaviKumarHi Ravi,
If you can call EJB from ABAP and from EJB call Web service which you want to call. I am giving code to write in EJB business method processFunction.
public void processFunction(Function function) {
IRepository repository;
repository = new Repository("TestRepository");
JCO.MetaData fmeta = new JCO.MetaData("ZTEST_EJB");
fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255, 0, 0,
JCO.IMPORT_PARAMETER, null);
fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255, 0, 0,
JCO.EXPORT_PARAMETER, null);
fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255, 0, 0,
JCO.EXPORT_PARAMETER, null);
repository.addFunctionInterfaceToCache(fmeta);
JCO.ParameterList input =
function.getImportParameterList();
JCO.ParameterList output =
function.getExportParameterList();
JCO.ParameterList tables =
function.getTableParameterList();
if (function.getName().equals("ZTEST_EJB")) {
output.setValue(input.getCharArray("REQUTEXT"),"ECHOTEXT");
output.setValue("This is a response " + table.getString("E_NAME") +" " + output.getName(1), "RESPTEXT");
else if (function.getName().equals("STFC_STRUCTURE")) {
JCO.Structure sin = input.getStructure("IMPORTSTRUCT");
JCO.Structure sout = (JCO.Structure)sin.clone();
try {
System.out.println(sin);
catch (Exception ex) {
System.out.println(ex);
output.setValue(sout,"ECHOSTRUCT");
output.setValue("This is a response from Example5.java","RESPTEXT");
}//if
Here REQUTEXT, ECHOTEXT are import parameter and RESPTEXT is the Export parameter of Function module ZTEST_EJB in SAP.
Here from this bisuness method you can call web service which you want and give back the result of webservice to ABAP F.M.
Regards,
Bhavik -
Moving to SAP HR from SAP ABAP
Hello Friends,
I have around 4 years of experience in ABAP. I now want to move into SAP HR (functional), since I feel that I have now attained a saturation level in ABAP, and need to widen my scope in SAP. Could you please let me know how can I make a beginning towards this area?
Thanks,
Mohit.
Edited by: mohitgoel28 on Sep 16, 2009 7:47 AMAs Sikander bhai said, Process wise you need to get some knowledge.
My suggestion would be to, first get into HR-Abap for year or more and then think about functional consulting. That would give more hands on experience on learning HR Process and Practices, functional and technically.
Also try to analyse your own organizations HR system and try to see the same system in SAP.
Thanks,
SuperHCM.
BTW congrats Sikander bhai on crossing 12000 forum points. Keep going -
Calling Crystal from SAP ABAP / BSP
Can anybody tell me how to call a Crystal Report (RPT on the BO XI Server) from a BSP?
How do you access the RPT on the BOBJ XI Server?
THANKS!Hi,
when you navigate to help.sap.com you can find the product documentation per product and release. Navigate to BusinessObjects enterprise as product and select the version - there you will find information to what is called "OpenDocument" which is a generic application that you can call with URL parameters.
Ingo -
Receiving notification from sap abap general forum
hi all,
2 days ago i started to receive every new post to my email from abap general forum. end up a day receiving almost thousand emails.
what has gone wrong with my profile? i did not make any changes.
thanksCheck the "Watch Forum" icon at the top, if it says "Stop Watching Forum", then click this icon.
ABAP Development
Regards,
Santosh -
Unable to insert rows into ORACLE database using ABAP code
Hai,
I am facing problem while creating a table in Oracle database with 15 attributes in a table. To create a table I am using the classes:
cl_sql_connection -
> to create the connection
cl_sql_statement -
> to execute the query
This I used by reffering the SAP program ADBC_DEMO. Without any trouble I am able to create a Table with 6 attributes by following the same procedure in ABCD_DEMO program but the same is not working for the table with 15 attributes .
Please help me.
Regards,
SwethaHai,
here is my code.
DATA: V_con_name TYPE dbcon-con_name,
con_ref TYPE REF TO cl_sql_connection,
sqlerr_ref TYPE REF TO cx_sql_exception,
c_tabname TYPE string VALUE `TO_DETAILS`,
c_coldefs TYPE string.
DATA: IT_ORA LIKE ZVOP_X_ORA_UPDATE OCCURS 0 WITH HEADER LINE.
V_CON_NAME = 'TVL-DSS-01'.
concatenate '(LGNUM CHAR(3) primary key,'
'TANUM VARCHAR2(10),'
'FLAG CHAR(1),'
'BDATU timestamp(3),'
'TAPOS VARCHAR2(4),'
'MATNR CHAR(18))'
'VLQNR VARCHAR2(10),'
'VLPLA CHAR(10),'
'VLBER CHAR(3),'
'NLPLA CHAR(10),'
'NLBER CHAR(3),'
'VDATE DATE(3) ,'
'BNAME CHAR(12),'
'VTIME DATE(4),'
'PROTYPEFLAG CHAR(1),'
'PROCOMFLAG CHAR(1))'
into c_coldefs separated by space .
TRY.
PERFORM: CONNECT USING V_CON_NAME CON_REF,
CREATE_TABLE USING con_ref c_tabname c_coldefs.
CATCH cx_sql_exception INTO sqlerr_ref.
TB_ERROR-MESSAGE = SQLERR_REF->SQL_MESSAGE.
APPEND TB_ERROR. CLEAR TB_ERROR.
ENDTRY.
form create
form CONNECT using p_con_name TYPE dbcon-con_name
p_con_ref TYPE REF TO cl_sql_connection
RAISING cx_sql_exception.
p_con_ref = cl_sql_connection=>get_connection( p_con_name ).
endform. " CONNECT
form create
form CREATE_TABLE USING p_con_ref TYPE REF TO cl_sql_connection
p_tabname TYPE string
p_coldefs TYPE string
RAISING cx_sql_exception.
DATA:
l_sqlerr_ref TYPE REF TO cx_sql_exception,
l_stmt TYPE string,
l_stmt_ref TYPE REF TO cl_sql_statement.
create a statement object
l_stmt_ref = p_con_ref->create_statement( ).
create the statement string
CONCATENATE
'create table' p_tabname p_coldefs
INTO l_stmt SEPARATED BY space.
execute the DDL command; catch the exception in order to handle the
case if the table already exists
TRY.
l_stmt_ref->execute_ddl( l_stmt ).
CATCH cx_sql_exception INTO l_sqlerr_ref.
IF l_sqlerr_ref->dbobject_exists = 'X'
OR l_sqlerr_ref->internal_error = 1024.
table already exists => drop it and try it again
PERFORM:
drop_table USING p_con_ref p_tabname,
create_table USING p_con_ref p_tabname p_coldefs.
ELSE.
RAISE EXCEPTION l_sqlerr_ref.
ENDIF.
ENDTRY.
endform. " CREATE_TABLE
please do help me
Regards,
Swetha -
Hello everyone,
I have an requirement to attach an excel file in mail while sending from SAP ABAP. This excel file is a formatted one and its having a proper template which is stored in wwwdata table in sap. My program will pick the file with no changes in format from presentation server i.e. my desktop and will be sent to external email-ids .
I have searched in scn but couldn't get a proper answer which will send the .xls file as attachment with no changes in format of template and data of excel.
Please suggest the approaches how to handle this one.
Regards,
MadhusmitaI have read those two help file and was able to use it in the ABAP proxy code. Thanks.
This is the current outcome. I totally understand that SAP PI communicates via XML. So when PI picks up a file that contains XML tags, the Inbound proxy is triggered. I can see its processing in SM50. However, when I give the Sender FTP adapter a non-XML file to pick up, the Inbound Proxy does not trigger. The file itself should be read into memory so that I can save it to the application server via ABAP code (with no mapping). That is why there is no operation mapping
The reason I am using using FTP to ABAP proxy is because I need to call a subsequent RFC step to process the file. Else, I will just use FTP to File Adapter scenario.
Question 1: I am thinking that that file is the attachment. Is that where I am incorrect and I still need to send in an XML file with the attachment as an addition?
Question 2: Is this the best approach or should I use BPM? If BPM, what steps do I need? -
HTTPS communication for Adobe Offline form with SAP ABAP WAS
Hi Experts,
Can we use HTTPS communication method to call a SAP ABAP Web Service from an Adobe offline form?
Example : I have a SUBMIT button in my Adobe offline form and when clicked, it populates a sales order number in the form.
Here my SAP ABAP server from where it reads the info is using HTTPS communication method. Now if i use the same service with HTTP it works fine but if i switch the service to use HTTPS it shows me an error "Error attempting to read from file. <https://FQDN/<service name> .
I am using self-signed SSL server certificate from SAP ABAP server. But here i also see a certificate error in my browser (IE 7.0) saying "Untrusted Certificate". Is this the reason for my above issue?
I could not find any post in SDN giving me the answer.
Regards,
HobinHi,
The Certificates are already imported into the Trusted Certificates Section. But the real Issue is regading the Adobe Offline forms. If I open the Adobe Offline forms in the Adobe reader 9.0 and the Web Service call is made based on the Https:// . It saying "Error attempting to Read the file". The Fully qualified domain name is also provided VA. I have tried to import the certificates to Adobe Reader's - Trust Identities but still it is not working . If I switch the webservice authentication method to Http:// then it would work. ADS is already configured with SSL. And the HTTPS:// based WebService embedded in the Adobe Interactive Form is working ,if the form is Online in the Browser (integrated in the Webdynpro Abap UI element).
Is there any other way to Add SSL Certificates to Adobe Reader , so that Https:/ based webservice will work if the Form is opened in Adobe Reader 9.0.
Regards,
Hobs -
Page restriction in adobe design from sap
Hi,
Iam designing my adobe form from SAP-ABAP transaction SFP.
In my form i have two pages
Page1 and page2.
I want to restrict the printing of these pages conditionally means.
based on my requirement, i want to print either page1 or page2 or some times both.
Can any one help me in scripting this.
Regards,
sasidharHi Lisa,
Please see the following topic where I provided links to information about creating URL redirects:
Problem: 2 different URL's for the same homepage
http://forums.adobe.com/message/4623619#4623619
What you're trying to accomplish (301 Redirect) requires making changes on your web server and cannot be done within Muse.
Best regards,
Corey -
Hi,
There is a requirement wherein one folder is created on presentation server ( Desktop ) in which we are putting excel files from
SAP ABAP using FM GUI_DOWNLOAD and now that folder contain file in excel forma lets say that folder name is INPUT. We have also created one more folder named OUTPUT and now the requirement is there is one executable converter file .exe in another folder lets say CONVERTER . Now the requirement is i need to execute that .exe file on excel file which it will then convert into necessary format which can be uploaded in bank site. The command works fine from windows i need to incorporate and execute the same command from SAP Kindly suggest any Function module,syntax or class n method exists for same.
The command which executed successfully from windows command prompt is
c:\>CONVERTER\ converter.exe C:\INPUT\FILE.XLS C:\OUTPUT\
The same command i need to execute it from SAP Report
Thanks
ParagHi:
Try with this:
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = u2018C:\CONVERTER\converter.exeu2019
parameter = u2018C:\INPUT\FILE.XLS C:\OUTPUT\u2019
minimized = u2018Xu2019
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
others = 10.
Maybe you are looking for
-
How to switch off the plugin update notification?
I am getting the ''"Some plugins used by this page are out of date"'' notification on every page with Flash. The version of Adobe Flash that I am using right now is v.10 - I don't want to update to v.11 'cause v.10 shows much better performance on my
-
Aspect ratio for old full screen games, advice sought on buying new monitor
Hi. I'm thinking of buying a ThinkVision LT2252p to replace the old monitor my employer threw out because I've found the old one doesn't offer scaling of the aspect ratio meaning that my golden oldie full-screen-only PC games are all stretched out of
-
What tasks I should select in NWA Configuration Wizard for PI component
Hello, I'm in the stage of setting up the NetWeaver 2004S SR2. I've logged to the Net Weaver Administration console. According to documentation, to properly configure PI component I should execute Configuration Wizard task. The problem is that docume
-
"Startup Disk Almost Full" But 190gb Free?
So I recently downloaded a program (MCMap Live) to make an image of my Minecraft world. I ran it the first time and it took up all my RAM like expected, but gave me issues. So I try to run it again without any other programs besides Finder running an
-
XML PROBLEM EXPORT PREMIERE PRO CS6
hello to all, the program is not running Premiere Pro CS6 upgrades and does not export more in XML format, there is the option in the dropdown menu of exporting premiere. com and I need to know I can do to reappear the option to export XML in premier