Found 92 Articles for ABAP

Using VBA macro to call an ABAP code

Amit Sharma
Updated on 14-Feb-2020 11:18:55

413 Views

Please try using below script −Dim sapConn As Object \Declaring a connection object Set sapConn = CreateObject("SAP.Functions") \Creating an ActiveX object sapConn.Connection.user = "username" sapConn.Connection.Password = "xxxx" sapConn.Connection.client = "client#" sapConn.Connection.ApplicationServer = "Application Server” sapConn.Connection.Language = "PT" If sapConn.Connection.Logon(0, True) True Then //Checking connection here    MsgBox "Not able to login to SAP" Else    MsgBox "Login Successful !!" End If Dim rfcAcctDocCheck As Object Dim oAcctHeader As Object Dim otAcctAR, otAcctGL, otAcctAP, otAcctAMT, otReturn As Object Set rfcAcctDocCheck = sapConn.Add("BAPI_ACC_DOCUMENT_CHECK") Set oAcctHeader = rfcAcctDocCheck.Exports("DOCUMENTHEADER") Set otAcctGL = rfcAcctDocCheck.Tables("ACCOUNTGL") Set otAcctAR = rfcAcctDocCheck.Tables("ACCOUNTRECEIVABLE") Set otAcctAP = ... Read More

How to have a structure with a table in ABAP?

Ramu Prasad
Updated on 10-Dec-2019 10:22:03

1K+ Views

The basic rule while specifying a table within a structure is that you have to give a non-unique constraint to that field.TYPES: myType TYPE TABLE OF string WITH NON-UNIQUE DEFAULT KEYThen use this in the structure definition:TYPES: BEGIN OF ty_itab, ….. myTable type myType, …….. TYPES: END OF ty_itab.

Debugging an Asynchronous RFC in SAP ABAP

Abhinaya
Updated on 30-Jul-2019 22:30:20

468 Views

In SAP system, an Asynchronous call (aRFC) of a remote-enabled function module specified in func using the RFC interface. The addition DESTINATION is used to specify a single destination in dest or use IN GROUP to specify a group of application servers. The latter supports parallel processing of multiple function modules.Check the below link which tells about Asynchronous RFC:https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/abapcall_function_starting.htm#!ABAP_ADDITION_2@2@

Using sy-datum low and high in ABAP Program

Rahul Sharma
Updated on 14-Feb-2020 10:24:16

2K+ Views

In this code, you have used ‘BT’ i.e. between so select option will hit any date between today and YYYYMMDD ‘99991231’.You should declare high dates at INITIALIZATION so that it is visible on the selection screen and you can change it if required.select-OPTIONS: so_date FOR sy-datum. INITIALIZATION.    so_date-sign = 'I'.    so_date-option = 'BT'.    so_date-low = sy-datum.    so_date-high = '99991231'. APPEND so_date.

In SAP ABAP, few records are skipped during parallel processing

Sravani S
Updated on 14-Feb-2020 10:11:03

225 Views

Check out on code to handle parallel processing-gv_semaphore = 0. DESCRIBE TABLE lt_itab LINES lv_lines. LOOP AT lt_itab INTO ls_itab. CALL FUNCTION 'ZABC' STARTING NEW TASK taskname DESTINATION IN GROUP srv_grp PERFORMING come_back ON END OF TASK EXPORTING ... EXCEPTIONS ... . "

Generating SAP ABAP code/ script from XML coming from an external application

Ankitha Reddy
Updated on 30-Jul-2019 22:30:20

517 Views

Yes, this is feasible. You can create simple transformation for XML in ABAP. You can also use cl_proxy_xml_transform to transform data between XML and ABAP. Let us say that you have created ABAP proxy using T-Code: SPROXY or it is generated via WebService generation utility, you can use utility class “cl_proxy_xml_transform” to convert data of the ABAP to XML format or also from XML → ABAP.

Equivalent for Row_Number() in SAP ABAP

Ali
Ali
Updated on 14-Feb-2020 11:18:18

496 Views

When you want to modify the contents and store them into table and also to add a column for the value, use something likeDATA: my_string TYPE StringLOOP AT itab INTO wa_itab. my_string = sy-tabix. CONCATENATE some_text my_string more_text into wa_itab-my_field. MODIFY itab FROM wa_itab. CLEAR my_string. ENDLOOP.

Extending SAP ABAP 30 characters long limit

Johar Ali
Updated on 30-Jul-2019 22:30:20

901 Views

For SAP ABAP tables, you can enter up to maximum 16 characters. There is a limit of up to 30 characters on use of ABAP Variables, Classes and Method.When you run SE11 you can press F1 and it will show you maximum permitted limit on SAP ABAP Table name.It is not possible to extend this limit as for this you need to make changes in Kernel.

Sending a table from UI5 application to ABAP Function Module

Johar Ali
Updated on 15-Jun-2020 06:38:18

540 Views

This can be done using an OData service that accepts POST request from your UI5 application and writes data to a database table. While implementing OData service, you have to call ABAP Backend Class method.You have to remember that all application and classes are instantiated for processing and will end as soon as the request is completed. An OData service can be created using SAP Gateway Service Builder (SEGW).Following steps has to be performed for creating an OData service:Creation of Data ModelGenerate Runtime ObjectsRegistration of ServiceService ImplementationOnce you create a project in Gateway Service Builder, you have to create Entity ... Read More

Pseudo code to hide warning in SAP ABAP

Sharon Christine
Updated on 30-Jul-2019 22:30:20

331 Views

This cannot be overridden or suppressed by a pseudo code of pragma. If you run your query with extended syntax check, you will find the message as well that this cannot be suppressed.  The extended check can be done by going to PROGRAM => Check => Extended Syntax Check

Previous 1 ... 4 5 6 7 8 ... 10 Next
Advertisements