Questions tagged [abap]
ABAP is the programming language of SAP softwares R/3, S/4HANA, CRM and many others.
3,284
questions
0
votes
0
answers
22
views
SAP Analytical List Report --> rerun table function based on Frontend-Filter
I created an "analytical list report" using the template. Additionally I created an AMDP class where I calculate a value based on what is selected from a CDS View.
If I set a filter in the ...
1
vote
0
answers
21
views
SAP Inbound IDoc Fields and Outbound IDoc Fields Mapping Before Outbound IDoc Trigger
BODS sends data to SAP System and we don't want to change pointers to trigger Outbound IDoc.
Now challenge is to map BODS Segment Fields to SAP IDoc Fields before trigger Outbound IDoc manually using ...
1
vote
0
answers
26
views
Restricting S/4HANA Users from Direct Dialog Logon
I would like to inquire about the possibility of restricting a group of users from performing a Direct Dialog Logon in S/4HANA. I attempted to utilize the EXIT_SAPLSUSF_001 exit, but it appears to be ...
0
votes
1
answer
34
views
SAP find list of function modules available in a SAP ECC version
The company I work at creates custom function modules for use in older SAP systems. Performance is very important in these function modules. Recently I was working on several FMs that read attachments ...
-1
votes
0
answers
44
views
Append rows as columns to another internal table [closed]
I got this table:
layout
type
column number
text of column to add to another internal table
JC_REP03
S
1
Tax Amount 19%
JC_REP03
P
2
Tax Amount 19%
JC_REP03
P
3
Tax Amount 9%
JC_REP03
S
4
Tax ...
-1
votes
1
answer
58
views
Compare row to column between tables
I got a question: is it possible to compare rows with columns in ABAP? If so, how to achieve that?
Imagine we have a table like this one, where column has a number inside its name:
FNCURR01
FNCURR02
...
0
votes
1
answer
40
views
How to correctly use test-seam for unit-testing?
I need to cover my check_adr method with tests, the most correct way to do this is using TEST-SEAM?
Here's my code:
TEST-SEAM selection.
SELECT DISTINCT addrnumber
INTO TABLE @...
-1
votes
1
answer
66
views
Is a DELETE followed by an Insert faster than a Single MODIFY?
I just found in a Class some Code, that wants to modify some rows in a Database. But instead of an Update or Modify, he used a Delete and an Insert. After asking him he told me, on SYBASE this was ...
0
votes
0
answers
40
views
How to correctly check that the table contains both values in ABAP?
I have a code in which I use the check_adr method to check if the selected address is in the table. The following logic occurs inside the check_adr method:
Obtaining the value of the addrnum_dd, ...
0
votes
1
answer
32
views
How to check the number of decimal places?
If I have a value, could be a type P or a string, i.e. 12.345, I want to know if the decimal places is more than two.
I cannot seem to find a conclusive way of doing this in ABAP from my research. ...
-1
votes
0
answers
16
views
Log not found (in main memory) Message no. BL207
In SAP S/4HANA 1909, on tcode 'WTY', I get this warning message
Users can get around it as it is just a warning, but I, being an ABAP developer, have to get rid of it as it is not letting me record ...
0
votes
0
answers
71
views
SAP ABAP Loop over internal table1 copying 1 column to a second internal table2 corresponding column on same index
I have a BAPI with importing parameters:
Header line from Purchase order document and
itemdata which is an internal table containing 1 or more Purchase Order (PO) positions. Those PO positions have 5 ...
-4
votes
1
answer
62
views
FOR ALL ENTRIES CONCEPT
TYPES : BEGIN OF TY_FINAL,
VBELN TYPE VBELN_VA,
ERDAT TYPE ERDAT,
AUART TYPE AUART,
* KUNNR TYPE KUNAG,
BEZEI TYPE BEZEI,
POSNR TYPE POSNR_VA,
...
-1
votes
1
answer
47
views
Using confirmation prompt with cl_salv_table
I need dynamically (at runtime) set or unset confirmation prompt for ALV GRID created by cl_salv_table->display( ).
I set breakpoint before CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY', manually assign '...
0
votes
0
answers
87
views
ABAP CL_HTTP_CLIENT->request->set_data failed 400 if data >= 1024 bytes
I'm using a POST request with a JSON through CL_HTTP_CLIENT.
Faced the following situation:
When xstrlen( jsonx ) <= 1024, I get http_rc = 200 (OK).
When xstrlen( jsonx ) > 1024, I get http_rc = ...
0
votes
2
answers
94
views
Submit report and simulate button click - ABAP
I need to call a report inside a RFC function module in ABAP passing some parameters. This can be done using the SUBMIT statement. When running the report, a selection screen is shown initially, which ...
0
votes
1
answer
54
views
Is there a way to declare a key attribute in ADT without the use of SE24?
When using the interface IF_WORKFLOW design a Business Object to be used in SAP Workflow, one can declare a key attribute using SE24. This helps when using SWUE to raise business events and test ...
-1
votes
1
answer
81
views
ABAP Open SQL - What is the function to return current date? [closed]
I'm looking for the equivalent of GETDATE() in SQL Server, but for ABAP Open SQL.
I have tried CURRENT_DATE, sy-date but with no success.
I've also tried CURDATE() and NOW(), but receive an error on ...
-1
votes
1
answer
57
views
Using BAPI_OBJCL_DELETE sometimes delete equipment class, sometimes not
I am trying to delete an equipment class using BAPI_OBJCL_DELETE but when running in debug mode, the class gets deleted but it doesn't get deleted in normal mode. I am using below program to delete it....
-2
votes
1
answer
147
views
The work area "LT_MARC" is not long enough. long enough
I am getting below error, how to fix it?
The work area "LT_MARC" is not long enough. long enough.
Code:
DATA: lt_marc TYPE STANDARD TABLE OF marc.
SELECT * FROM marc AS mc
INNER JOIN ...
2
votes
1
answer
92
views
JSON deserialize in ABAP when JSON field names have spaces
I am getting JSON response like below
[
{
"Status": "00"
},
{
"Order Due Date": "",
"Customer Address": "",
"ConsumerId": "&...
0
votes
2
answers
100
views
SAP simple transformations with dynamic namespaces
I receive XML messages from a subsystem that sends changing namespaces.
The system seems to increase a counter on a namespace depending on if its needed.
I don't know how to handle this in SAP.
For ...
0
votes
3
answers
201
views
Read internal table - field symbol has not been assigned yet
I have wrote this small piece of code which updates the data in it_alv based on values in another internal table it_alv_to_check.
At some point while executing the code in the ELSE statement block, I ...
0
votes
0
answers
51
views
error "Create valuation-type-independent data first" while using BAPI_MATERIAL_SAVEDATA
While creating material, getting error
Create valuation-type-independent data first (PMD_MSG024)
In debugging all data coming in `bapi_mbew and bapi_mbewx structures. All this started after I added ...
0
votes
1
answer
184
views
Problem with Query: "SQL Error SQL CODE: 4"
I was trying to execute this SQL statement within my report and I got this error:
Is there any way to improve this query so it fetch data faster?
SELECT bs~bukrs,bs~gjahr, bs~h_monat , bt~mwskz, ...
0
votes
1
answer
52
views
CREATE DATA: The specified type "BELNR,BUKRS,GJAHR,MANDT" is no valid data
At the moment it does something wrong with the primary key when it collects them, some tables have more that one primary key.
The output error is this one for example if running the program with table ...
0
votes
0
answers
27
views
Replicate Mass Materials [MATMAS] without Change Pointers
BODS is sending millions of IDocs into SAP ECC system. In this ECC system we have a custom IDOC Extension. Only for this Extension BODS sends data.
[ BODS Sending Data ] -- (1) --> [ Source ECC ] --...
0
votes
1
answer
111
views
Number '0' is treated as "initial", but I want it to be treated as "not initial" special value
I try to learn ABAP and code my first simple calculator using parameters.
However, I have stumbled upon a problem. I want an error to be shown when some parameters are empty, i.e. when nothing was ...
0
votes
2
answers
91
views
Why can't I get the correct result when the same character is repeated a lot in the character count in the string?
I can't get the correct result when the same character is repeated too many times in the string expression in ABAP.
When it is more than 10, the repeating character gives * instead of number as a ...
1
vote
0
answers
34
views
why method get_entity returns 404
I have implemented the get_entity of the parent and it works for me but when I want to implement the get_entity of the child it doesn't work and I don't know why?
It gives me error
404
but what I ...
0
votes
1
answer
129
views
Calling a SAP table in Python via RFC_READ_TABLE gives an error: DATA_BUFFER_EXCEEDED
I am trying to extract a SAP table in Python using RFC_READ_TABLE:
result = conn.call('RFC_READ_TABLE', QUERY_TABLE=table_name, DELIMITER='|', FIELDS=fields, OPTIONS=Options, ROWCOUNT=MaxRows, ...
-1
votes
1
answer
45
views
Method's returned value becomes empty after call
I wrote a global class with some methods in order to write UNIT tests for them later. The problem is that when I call the GET_BOOKS method, the data comes to RV_BOOKS, everything is fine. However, as ...
0
votes
1
answer
293
views
Join EKKO, EKPO and EKBE - SAP
What is the correct joining logic between EKKO, EKPO and EKBE tables ?
I need to get all the Good Receipts done on a Purchasing Order. Below is the logic I use currently:
select "required columns&...
-1
votes
1
answer
44
views
Guessing an ABAP PIN in 3 attempts using a loop?
how can I pack this code in a loop where you have 3 attempts to guess the PIN?
DATA: pin_correct TYPE i VALUE 1234.
PARAMETERS lv_pin TYPE i.
DO 3 TIMES.
IF lv_pin EQ pin_correct.
WRITE '...
0
votes
0
answers
43
views
ABAP adding new field to a dynamic table
I have one big select like this;
SELECT (lv_selection) FROM crms4d_serv_h
INNER JOIN crm_jest ON crm_jest~objnr = crms4d_serv_h~header_guid
AND crm_jest~inact = space
INNER ...
0
votes
1
answer
198
views
How to disable/Enable a row in Steploop based on checkbox- SAP ABAP
I have been working on a report for a Handheld device with Steploops.
The problem I am having is that I need to disable a qty field when a checkbox is checked but enable it again when it is unchecked.
...
0
votes
0
answers
84
views
Loop at Screen MIGO additional tab
I'm working on additional bar in transaction MIGO regarding this tutorial:
https://blogs.sap.com/2013/06/14/how-to-create-a-custom-tab-for-migo-item-details/
This solution uses two screens to present ...
0
votes
1
answer
156
views
Clearing rows of dynamic internal table with empty value in one column
I am trying to remove rows that have empty values in one column segment. The table is declared dynamically so it does not have a standard type that I can use in DATA declaration like I used to do (...
0
votes
0
answers
46
views
HR-ABAP: how limit values in select-options list
When I want to get a list of users absence types, I use:
select-options: abs for p2001-awart.
When I want to get a list of users presence types, I use:
select-options: prs for p2002-awart.
In both ...
0
votes
1
answer
50
views
ABAP Open SQL SELECT statement displaying all linked materials to my documents
The following is the case: I'm using the DRAD and DRAW SAP tables. I would like to receive all linked material links per documents.
I have: DRAD (only relevant columns are shown):
╔══════════╦═════════...
0
votes
2
answers
74
views
How to get two same entities in ABAP OData according to the id?
I am developing a fullstack ABAP OData and SAPUI5 application.
I have some issues with connect two entities in the request.
I have a table called "Flight" and a table called "Airport&...
0
votes
1
answer
129
views
http request from ABAP to IIS 10 remains zipped when processed in PHP
We are sending XML-files from ABAP to IIS 10-webserver by http-request which is processed by PHP. Uncompressed sent data works well, but if I switch on compression in ABAP, PHP receives scrambled (...
0
votes
2
answers
315
views
Highlight (mark) / set a cursor to a specific line in an event in Table Maintenance Generator (SM30)
I have implemented the event 01 - Before saving the data in the database for a table in the Table Maintenance Generator TMG.
In the implementation code I am looping over the total table, checking for ...
0
votes
1
answer
28
views
PLM QM Audit: disable signature button / signature requirement; make an audit object(s) a mandatory field
There are a number of changes in PLM QM Audit module with which I am struggling at the moment.
First requirement: disable (deactivate) Signature button in the Result tab of the audit object and ...
0
votes
2
answers
245
views
What would be the best way to insert records with ABAP to a custom table
I have a table in SAP called ZDT_COUNTRY with the following fields:
MANDT (type: NUMC)
ID_PAIS (type: NUMC)
NAME_PAIS (type: CHAR)
CAPITAL_PAIS (type: CHAR)
POBLACION_PAIS (type: NUMC)
SURFACE_PAIS (...
0
votes
1
answer
201
views
Default / static methods implementation in ABAP OO Interface
In Java starting from JDK 8 it is possible to define a default implementation of a method in an interface with the default keyword at the beginning of the method signature, mainly to enable to add new ...
-1
votes
2
answers
783
views
Upload XLSX with GUI_UPLOAD in a system 7.00
Is it possible to load in an itab an excel XLSX using the cl_gui_frontend_services=>gui_upload?
The system is ECC6 7.00 an old one.
Thanks
Elias
0
votes
0
answers
182
views
How to run an RFC Function Module in a SAP background job without a predefined login/trusted relationship in SM59?
I need to run an RFC Function Module inside Report in Background Job. The background job was canceled because of the sap logon screen.
The RFC Destination was maintained in SM59 with No Trusted ...
0
votes
1
answer
98
views
How to signal that some fields from a DDIC structure are intended to be hidden or "technical" in an ALV?
My goal is to make a dynamic ALV whose field catalog is based on a custom DDIC structure that is passed to it. I want some fields of my DDIC structure to be hidden in the ALV but I should not hardcode ...
0
votes
1
answer
142
views
ABAP flag duplicate values in internal table
I need to flag the duplicate values and I found a solution using the code below:
sort result_package stable by knumh zzklfn1.
data lv_prev_knumh type c length 10.
loop at result_package assigning <...