ABAP Articles

Page 5 of 9

Using VBA macro to call an ABAP code

Amit Sharma
Amit Sharma
Updated on 14-Feb-2020 737 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 = ...

Read More

Equivalent for Row_Number() in SAP ABAP

Ali
Ali
Updated on 14-Feb-2020 984 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.

Read More

Using sy-datum low and high in ABAP Program

Rahul Sharma
Rahul Sharma
Updated on 14-Feb-2020 3K+ 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.

Read More

In SAP ABAP, few records are skipped during parallel processing

Sravani S
Sravani S
Updated on 14-Feb-2020 371 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 ... . "

Read More

Accessing Source code of SAP Transport without using SAP system

Abhinanda Shri
Abhinanda Shri
Updated on 14-Feb-2020 453 Views

I don’t think it is possible to check source code without SAP system until you understand SAP Binary code. The format in which the data are stored in the data file is AFAIK, an SAP own format and you can use R3trans to read code using the command.R3trans -l [-w ] [-v ]To know more about R3trans, you can refer to this link −https://archive.sap.com/discussions/thread/1277788

Read More

Source code of ABAP reports without restriction

Sai Subramanyam
Sai Subramanyam
Updated on 14-Feb-2020 587 Views

If you have to use RFC, you can write RFC enabled function module. You can write a new FM that allows you to retrieve program source code. To start with, you need to create a structure as shown in below and based on which you have to create a table type. This table can be passed to a RFC function.Here shows a table type that you can use in Function Module:Next step is to create a function module with RFC-enabled. You have to pass parameters while creating function module.function zsrcex_extractor . *"---------------------------------------------------------------------- *"*"Local Interface: *"  IMPORTING *"     VALUE(PACKAGE_SIZE) ...

Read More

Creating a Radio button group in ABAP Screen Painter

Akshaya Akki
Akshaya Akki
Updated on 13-Feb-2020 6K+ Views

Screen Painter is known as an ABAP editor tool that can be used to create a screen. Screen Painter is used to create and manage all the elements in a screen.Transaction Code SE51There are various ways you can insert a Radio button to ABAP Screen Painter. First is by clicking on the radio button symbol on the left, then click on the canvas on the right to insert a radio button. You can repeat this for each button.Another option is that you open the dictionary window (blue rectangle with a smaller red rectangle inside). Type the variable name you used ...

Read More

Converting date type SYDATUM in a format like MM/DD/YY in SAP ABAP

Alankritha Ammu
Alankritha Ammu
Updated on 13-Feb-2020 6K+ Views

It depends if you want to write it to a list screen or you want to convert it to a text variable. To write it to a list screen, you can use below code −WRITE I_my_dateMM/DD/YYYYTo convert it to a text variable, you can use below command −WRITE l_my_dateTO l_my_text MM/DD/YYYYIf you want to set the date in SAPscript form, you can use SET DATE MASK command. You can specify date fields to be printed in specified format −/: SET DATE MASK= 'date_mask'In the date mask, you can use the following codes −DD: day (two digits) DDD: day name - ...

Read More

Combining fields in CDS view in SAP ABAP

karthikeya Boyini
karthikeya Boyini
Updated on 16-Dec-2019 3K+ Views

With the use of SAP ABAP 7.5, you can make use of the CONCAT_WITH_SPACE function.ExampleThe above code can be simplified like this:CONCAT_WITH_SPACE( bp.name_first, bp.name_last, 1 )

Read More

Inserting rows in an empty table to test output of ABAP code

Samual Sam
Samual Sam
Updated on 16-Dec-2019 603 Views

You can find the option to either insert a row into a table or change the content of the table using the Table tools/Table display services

Read More
Showing 41–50 of 84 articles
« Prev 1 3 4 5 6 7 9 Next »
Advertisements