SAP & Oracle partner and support companies

Loading

Blog

SAP

Secondary Index in Traditional SAP Database and SAP HANA Database

Let’s begin by discussing secondary indexes in SAP HANA and traditional SAP databases. Since a list is an organized copy of the selected data set table fields, we all know that a file in a data set table helps to retrieve the selected column more quickly. In real-world scenarios and practical endeavors, we often lack the necessary keys in our decision boundaries; as a result, the complete table needs to be examined without the necessary list. We are persuaded to create Optional Records in exemplary non-HANA SAP Data Set tables in these situations. SAP HANA and traditional SAP databases both have secondary indexes.

By and large, making Auxiliary Record makes information recovery quicker. Be that as it may, we need to pay something for this Optional Record. What is the cost of having Auxiliary List? Secondary Index in Traditional SAP Database and SAP HANA Database.

Reply:

1) Each time a passage is saved in the data set table, there is an extra above of refreshing the Auxiliary Files. Each extra record dials back the addition of columns in the table.

2) On the off chance that we have an excessive number of Auxiliary Lists for the information base table, odds are there that the capacity memory consumed for these files is nearly essentially as immense as need might have arisen for the entire data set table itself.

3) Premise Group needs to invest a lot of energy routinely to redesign the records that get divided over the long haul.

4) An excessive number of files can likewise cause the information base framework enhancer to choose some unacceptable record. To forestall this, the files in a table should share as couple of fields as could be expected.

What number of Optional Lists would it be a good idea for us to have in an exemplary data set table?
Reply: SAP suggests something like five auxiliary files.

When would it be a good idea for us to make Optional File?

Reply:

1) The fields in an Optional List ought to be fields through which we frequently select. The field or fields of an optional list ought to be particular to the point that each file section compares to exceptionally least percent of the complete passages in the table. SAP suggests Optional List ought to hold a limit of 5% of the all out number of table passages.

2) Auxiliary files are to be made exclusively for information base tables where the read gets to are additional time-basic than the compose gets to since each made list must be kept up with for compose gets to.

3) The fields that are probably going to be questioned with the = administrator ought to be toward the start of the list.

WHERE Proviso for Auxiliary Record:

1) ‘=’ (Equivalent to Administrator), IN conditions ‘AND’ joins are productively upheld by Auxiliary File, i.e they love Positive administrators. Auxiliary Record additionally works for LIKE proviso on the off chance that you can’t give EQ, IN statement.
IN implies various EQ for a section. Consequently, IN is viable in WHERE Condition.

2) Negative situations such as <>, NE, and NOT should be avoided. We should change the WHERE clause to make it sure if at all possible. In any case, we should identify the circumstances in the WHERE condition and not completely ignore them if this is absurd. This is the primary method used to choose the relevant information records. Any other technique would violate the exhibition rule as you would be looking through useless records that you would then have to remove in the ABAP program.

3) In the event that you don’t determine all fields in the list, ensure that you encase the underlying part of the file in the WHERE condition. In any case, the utilization of a record is beyond the realm of possibilities as a rule.

The enhancer for the most part stops on the off chance that the determination condition contains an ‘OR’. As such, it doesn’t assess the fields checked by ‘OR’ while choosing and applying the record. An exemption for this is ‘OR’ connections remaining all alone. Thusly, conditions containing an OR join for one of the filed fields ought to be reformulated if vital.

The optimizer stops working when it encounters OR in the following SELECT statement.

Not Recommended

SELECT * FROM spfli 
WHERE carrid = 'LH' AND 
( CITYFROM = 'FRANKFURT' OR cityfrom = 'NEW YORK' ).

When replaced by the equivalent statement (below), the entire condition can be optimized with respect to the existing indexes.

Better use of ‘OR’ clause.

SELECT * 
FROM spfli 
WHERE ( carrid = 'LH' AND cityfrom = 'FRANKFURT' ) OR 
( carrid = 'LH' AND cityfrom = 'NEW YORK' ).

What is the SAP Table which stores the file names and data for any data set table?
Reply: DD12L – R/3 S_SECINDEX: auxiliary lists, header

Above we discovered that SAP suggests greatest 5 Optional Files be made. Actually, what number of Optional Files could we at any point make in conventional (non-HANA) SAP data set?
There are many responses in famous SAP Discussion. Some say 9 others say 16 and some say limitless.

Reply: I checked our SAP framework and found that we have Auxiliary Lists to the count of 25. Check, even the MARA table has 16 records.

Secondary Index in SAP

Some place in the Discussion, that’s what I read, SAP tosses a message when we attempt to make in excess of 16 Optional Files. Check we have 16 files in the framework.

3

I’m attempting to make the seventeenth Optional File and framework doesn’t caution me or toss any message.

2

We seem to be able to create an infinite number of auxiliary files. SAP recommends fewer records, but it doesn’t stop you if you don’t follow its rules. That’s what makes SAP so amazing.

What is the maximum amount of fields that an optional file can contain?
In response, a creator mentioned in a well-known SAP blog that he might create the file using the largest 16 fields.

I made an effort to replicate the hard stop where SAP prohibits using more than 16 fields. As you can see in the image below, SAP didn’t weep when I added more than 25 fields to a list.

Secondary Index in SAP

Additionally, check the length of these fields are in excess of 255 characters despite everything SAP didn’t stop. Seems to be, actually Auxiliary Record can have limitless fields. Could any master at any point affirm this?

Note: With respect to Drain Help Report, a record ought to just comprise of a couple of fields and, generally speaking, something like four fields.

There are such countless contemplations to be considered while making and utilizing Auxiliary Lists. Isn’t it minimal befuddling as well? Uplifting news. With the HANA advancement, we may in all likelihood never need Auxiliary Records in HANA Data set.

By and large, SAP HANA doesn’t need optional records for good inquiry execution. HANA data set store information in segment store naturally. Thus, every segment is a list in itself. SAP suggests utilizing Line store just in remarkable cases.

To diminish primary memory utilization, and to further develop embed execution all current non-special optional data set files on columnar tables are taken out during movement or don’t get made during establishment. Special files stay as they address an imperative on the table.

Exclusion of Secondary Index in HANA migration

This is substantial for all AS ABAP frameworks from SAP NetWeaver 7.4 onwards!

This is our customary framework for all the above screen captures.

Components of 740 Ehp

How about we rehash the inquiry once again. How might HANA Information base bear to dispose of Optional Lists?

Reply: HANA framework can examine the data set table at easing up speed as it is not quite the same as old style information bases. HANA data set tables are Segment based rather than Line situated in conventional data sets. This implies we don’t require files any longer. As currently referenced above, HANA data set section fields act as though we have physically made a list on each field of the table yet with practically no expense/cost/disadvantages of optional records as referenced above for conventional information base.

By removing files, we can reduce the amount of space that the data set takes up. For instance, auxiliary lists save 5% of the RAM that they would have used. It looks like the file pages at the back of the real books are removed, and the overall number of pages in a book is reduced. Additionally, you possess the extraordinary ability to read one million words every second and locate any word in a very little portion of the text. Therefore, you can locate the page number where that term appears in the book without referring to the lists at the back.

Does it mean, we can’t make Records in HANA Data set?
Reply: Indeed, we can make Files in HANA Data set. HANA permits the Make Record order.

SAP master John Appleby says: Never make File in HANA. At the point when we make a table in HANA, it is, truth be told, making a bunch of arranged, compacted and connected lists. Therefore, optional records never further develop execution.

He says: “There is one situation when an optional file can further develop execution: when you have an inquiry which chooses a tiny measure of information from an extremely enormous table (or gathering of joined tables). In this example, making an optional file on the entirety of your sort sections can permit HANA to find the information quicker. Yet, this is what is going on – the straightforward exhortation is, never make files”.

As such, in specific dark situations where we find a presentation issue, an optional list can help. This is just in OLTP situations, where you have complex joins and just return a little subset of information from the table. The vast majority of situations won’t ever profit from a record. They occupy room and will slow embed activities, so ought to be stayed away from in HANA Data set.

Since we discovered that we can in fact make Files in HANA. What are the kinds of Lists in HANA?
Reply: There are two kinds of Files in HANA.

1) Inverted Index and 

2) Composite Index.

Inverted Index: Rearranged records allude to just a single section. Here, the list information is put away in inside memory structures that have a place with the separate segment.

Composite Index: Composite files allude to more than one segment. In the first place, the items these segments are assembled in an inward section, and a rearranged file is then made for this inside section.

We will examine insights regarding Rearranged/Composite Files in a different post.

To get such helpful and reasonable articles directly to your inbox, kindly Buy in. We regard your security and view safeguarding it in a serious way.

Much thanks for your time!!

YOU MAY LIKE THIS

ABAP Test Cockpit(ATC) – Introduction and Steps

Create and Consume Business Add-in(BAdI) in ABAP

How to Convert JSON Data Structure to ABAP Structure without ABAP Code or SE11?

SAP

Taking one step back after EhP7.4, does it make sense for Web Dynpro UI?

Does your Internet Dynpro UI Screen appear to be unique after EhP7.4 Overhaul? Taking one step back after EhP7.4..

We recently upgraded to EhP740, which brought with it a fresh appearance and feel. The BOXes, NEW Administrators, Worth Administrators, brilliant Google-like thoughts when writing the text, and so on are just incredible. In fact, even the user interface displays have cutting-edge highlights and mitigating appearances (SAP is really getting ready for cell phones, mists). In any case, the new UI highlights did not pique the interest of our business clientele, who are accustomed to the outdated UI panels. According to someone, anything that feels familiar always seems simpler.

Now taking one step back after EhP7.4, They requested the standard, worn out look and all buttons. I wonder, did we truly redesign or would we say we are making a stride back after overhaul?

Anyway, what all are absent in the UI screen after redesign?

The most unmistakable non-attendant according to our clients are:
I) The section separator vertical line appears to have vanished.
ii) The custom button appeared to be unique and accentuation and variety was a No.
iii) The channel button is as of now not apparent.

Perhaps you’re wondering if SAP really removed the channel button. “No” is the response. A positive move has been taken by SAP. I acknowledge that its channel and sort usefulness at the segment level (as in Succeed) is really valuable. Who can convince our clients, anyway?

You can also read for: A to Z of OLE Excel in ABAP 7.4

A picture speaks louder and more effectively than a thousand words.

Look how one of our UI screen looked before Upgrade.

Before

Presently look at a similar screen after Redesign.

After

Have you noticed that the channel button and the upward line separators between parts are missing? Channels and sorts are at the section level, as I mentioned previously. Any section can be tapped to complete the channel and sort usefulness. Look at the personalized buttons as well.

Personally, I enjoy the fresh vibe. Is it fair to go back to a stage’s previous appearance? This could be a topic for discussion at a later time.

After little exploration one of our colleague sorted out that with Ehp7, we can add a boundaries in the Internet Dynpro application to get what our clients needed.

Let’s add the following parameter.
WDTHEMEROOT sap_standard STRING Stylesheet URI

1 PARA

Look how the screen looks now. The screen is near the before overhaul look. Still the upward separator and channels are absent.

After 1 Para

Add one more parameter.
WDUIGUIDELINE GL11 WDR_APP_PROP_UIGUIDELINE UI Guideline

2 para

Presently we are totally one stage back. All that we had before overhaul is availble here.. Blissful Business Clients..

After 2 Para

What does GL11 mean?
F4 on the boundary esteem field uncovers there are two adaptations of UI Rule. GL11 is 1.1 adaptation and as a matter of course in EhP7 the UI form is 2.0 (GL20).

Guide Line

Setting GL11 resembles going one stage back. Do you concur?

Assuming you enjoyed it, if it’s not too much trouble, share it! Much obliged

YOU MAY BE INTERESTED IN

SAP FICO Demand In India

ABAP Evolution: From Monolithic Masterpieces to Agile Architects

SAP ABAP future in next coming years

SAP

NEW Operator – Structures and Internal Tables

NEW operator for internal tables and ABAP structures Can we declare NEW # for d_ref_struct as it appears above? (NEW Operator: Internal Tables and Structures)
D_ref_struct would not recognize matnr and werks because it is an anonymous data object. The mistake is that for the operator “NEW,” no type can be inferred from the context.

The right way is to define d_ref_struct as structured object as shown below. NEW Operator – Structures and Internal Tables

You can also read for :- NEW Operator – Single Value for All Data Types

1. For Structures
i) Anonymous data object

* Example 1
TYPES: BEGIN OF ty_marc,
  matnr TYPE matnr,
  werks TYPE werks_d,
END OF ty_marc.
 
DATA: d_ref_struct TYPE REF TO data.      " Anonymous data object
 
d_ref_struct = new ty_marc( matnr = '165251' werks = '4030' ).
* Example 2
d_ref_struct = NEW #( matnr = '165251' werks = '4030' ).

Might we at any point proclaim NEW # as displayed above for d_ref_struct?
D_ref_struct would not perceive matnr and werks because it is a mysterious information item. The mistake is that the administrator’s “NEW” setting does not yield any results.

The proper approach to describe d_ref_struct is as an organized object that is shown below.

ii) Structured data object

* Example 2
TYPES: 
BEGIN OF ty_marc,
  matnr TYPE matnr,
  werks TYPE werks_d,
END OF ty_marc.

DATA: d_ref_struct TYPE REF TO ty_marc. " Structured data object

d_ref_struct = NEW #( matnr = '165251' werks = '4030' ).

When “#” succeeds NEW, it means the object ref in the Left Hand Side determines the type.

2. For Internal Tables
i) Anonymous data object

* Example 1
TYPES: 
BEGIN OF ty_marc,
  matnr TYPE matnr,
  werks TYPE werks_d,
END OF ty_marc.

DATA: d_ref_tab TYPE REF TO data. " Anonymous data object

d_ref_tab = NEW ty_marc( ( matnr = '165251' werks = '4030')
                         ( matnr = '165251' werks = '5172') ).

Going by the case of designs displayed above before inside table, this model 1 of inward table looks right. In any case, SAP could do without it..

What turned out badly?
NEW ty_marc( ) is pertinent for structure. In this way, can’t switch over completely to interior table.

Lets attempt once more by proclaiming a table kind.

* Example 1 -- first retry
TYPES: 
BEGIN OF ty_marc,
  matnr TYPE matnr,
  werks TYPE werks_d,
END OF ty_marc.

TYPES: tt_marc TYPE TABLE OF ty_marc.

DATA: d_ref_tab TYPE REF TO data. " Anonymous data object

d_ref_tab = NEW tt_marc( ( matnr = '165251' werks = '4030')
                         ( matnr = '165251' werks = '5172') ).

Here we rolled out two improvements.
I) Table Sort tt_marc is characterized.
ii) NEW tt_marc is utilized rather than NEW ty_marc

Yet, still the framework gives mistake “A worth of the nonexclusive kind “TT_MARC” can’t be built”.

How about we offer another chance.
Here we will add only 3 watchwords “WITH DEFAULT KEY” in Table Kind announcement.

* Example 1 -- second retry
TYPES: 
BEGIN OF ty_marc,
  matnr TYPE matnr,
  werks TYPE werks_d,
END OF ty_marc.

TYPES: tt_marc TYPE TABLE OF ty_marc WITH DEFAULT KEY.

DATA: d_ref_tab TYPE REF TO data. " Anonymous data object

d_ref_tab = NEW tt_marc( ( matnr = '165251' werks = '4030')
                         ( matnr = '165251' werks = '5172') ).

Bingooo!!!! WITH DEFAULT KEY got the job done. Unknown information object is currently an inner table.

The following is one more guide to characterize and populate inward table with mysterious item.

* Example 2
TYPES:
begin of ty_marc,
  matnr type matnr,
  werks type werks_d,
end of ty_marc.

DATA: d_ref_tab TYPE TABLE OF REF TO DATA, " Anonymous data object
      wa_marc   TYPE ty_marc.

 SELECT matnr werks UP TO 10 ROWS FROM marc INTO wa_marc.
  APPEND NEW ty_marc( wa_marc ) to d_ref_tab. " Object is created here

The substance of the line is alloted to the information object. The item is made at the assertion Add and the NEW information reference is affixed straightforwardly to an inward table with the suitable line type. The outcome is a table that references generally new unknown information objects of 10 lines.

ii) Structured data object

* Example 3
 TYPES:
 BEGIN OF ty_marc,
   matnr TYPE matnr,
   werks TYPE werks_d,
 END OF ty_marc.

 DATA: d_ref_tab TYPE STANDARD TABLE OF REF TO ty_marc, "Structured object
       wa_marc   TYPE ty_marc.

 SELECT matnr werks UP TO 10 ROWS FROM marc INTO wa_marc.
   APPEND NEW #( wa_marc ) TO d_ref_tab.
 ENDSELECT.

Trust with the above models and pieces, you would be in the situation to mess with NEW Administrator. In our next post we would investigate the Worth Administrator.

YOU MAY LIKE THIS

SAP MM Salary Guide: What You Need to Know

abap ale idoc rfc step by step

What is the demand for the SAP PP module?

SAP

NEW Operator – Single Value for All Data Types

ABAP is a new operator single value. We shown in the last post that one of the enhanced features in EhP7 is NEW Administrator. In this case, NEW Operator – Single Value for All Data Types or NEW Administrator – Single Incentive for All Information Types would be used.

NEW Operator: One Value for All Data Types for the New Administrator

you can also read for:- list of data types in sap abap

I) At any one time, an articulation that has been identified for an information item may either contain or be a constructor articulation.

ii) When a constructor articulation is doled out to a reference variable utilizing NEW, this variable focuses to the underlying item all along. This implies that the first reference is as of now not accessible involving the objective variable in the articulation.

* Example 1
PARAMETERS input(10) TYPE c DEFAULT 'EhP7'.
 
DATA d_ref TYPE REF TO string.
 
d_ref =  NEW string( 'Welcome' && ` ` && input ).
 
WRITE:/ d_ref->*.

NEW operator constructs an anonymous data object of the type string, whose value is determined using a string expression.
Note: The chaining operator && concatenates two operands in a string expression as a character string.

* Example 2

TYPES: BEGIN OF ty_marc,
          matnr TYPE matnr,
          werks TYPE werks_d,
       END OF ty_marc.

DATA:  d_ref   TYPE STANDARD TABLE OF REF TO ty_marc,
       wa_marc TYPE ty_marc.

SELECT SINGLE matnr werks FROM marc INTO wa_marc.

APPEND wa_marc TO d_ref.  " Syntax Error

The above statement APPEND wa_marc to d_ref would give syntax error:  “WA_MARC” cannot be converted to the line type of “D_REF”.

Instead if we use the NEW Operator as shown below, the content of the work area can be assigned to the data object d_ref.

APPEND NEW #( wa_marc ) TO d_ref.

Following the SELECT, a structured, enigmatic information object is created for the selected column. This information object receives the line’s substance. The article is written in the assertion’s general articulation position. Simply attach the NEW information reference to an inner table using the appropriate column type. A table referencing mostly new, enigmatic information objects is the result.

As mentioned in a previous post, the article reference on the left-hand side determines the sort when “#” comes after NEW.

These are basic models. In resulting posts, we would attempt to investigate more perplexing and genuine undertaking situations. Kindly look at the following post on structures and inner tables in NEW Administrator.

YOU MAY LIKE THIS

SAP FICO Demand In India

SAP FICO as a Career

Proxy in SAP Abap: Seamless Communication

SAP

Hello SAP EhP7 !!

Introduction to SAP EhP7 More than 750 business capabilities are included in SAP Upgrade Bundle 7 for SAP ERP 6.0, according to SAP news. Information maturing objects, MRP runs, and SAP Fiori are the main new components. The primary upgrade package for both the SAP HANA data set and the traditional validated data sets is SAP EhP7.

Being a straightforward ABAP engineer, I was curious to know how this 7.4 overhaul will affect an ABAPer. After reviewing the sap discharge reports and researching the framework, I have tried to document the advancements that ABAPers like me would find interesting.

Also, NEW and Worth Administrators are the main elements in SAP EhP7, which the ABAPer would utilize routinely.

NEW – Instance Operator
i)   NEW – Initial Value for All Types
ii)  NEW – Single Value for All Data Types
iii) NEW – Structures
iv) NEW – Internal Tables
v)  NEW – Classes

VALUE – Value Operator
i)   VALUE – Initial Value for All Types
ii)  VALUE – Structures
iii) VALUE – Internal Tables

In this post, I would like to show some usage of NEW Operators for Initial Value for All Types.

* Type declaration
TYPES: BEGIN OF ty_marc,
          matnr TYPE matnr,
          werks TYPE werks_d,
       END OF ty_marc.
 
* Type Ref To
DATA o_ref  TYPE REF TO ty_marc.
* Example 1
* Instantiate the object
 o_ref = NEW ty_marc( ).
 
 * Usage demo
 SELECT SINGLE matnr werks FROM marc INTO o_ref->*.
 IF sy-subrc EQ 0.
 * Displaying the fields as we used to do earlier
   WRITE:/ o_ref->*-matnr, o_ref->*-werks.
 ENDIF.

Please note NEW <TYPE>( ) is the syntax to instantiate any object.

* Example 2
* Instantiate the object using #
 o_ref = NEW #( ).
 
* Usage demo
 SELECT SINGLE matnr werks FROM marc INTO o_ref->*.
 IF sy-subrc EQ 0.
* Displaying the fields as we used to do earlier
   WRITE:/ o_ref->*-matnr, o_ref->*-werks.
 ENDIF.

Note NEW # () if it’s not too much trouble. It is implied that the article ref on the left determines the sort when “#” comes after NEW.

This brief post aims to raise your awareness of the new linguistic framework. The capabilities of the two constructor articulations mentioned above are comparable. In future postings, I’ll go into greater detail about NEW and Worth admins.

You can also read for:- How to Restore SAP Number Range Object ?

Oh no! Are you thinking about how the outcome might appear before I shut down? The same old thing. The yield is same to that of SAP EhP7. The yield show has not been redesigned.

If you liked it, please share it! Thanks!

YOU MAY BE INTERESTED IN

SAP PP Jobs: Unlocking Opportunities in PP

What is the demand for the SAP PP module?

SAP ABAP Interview Questions Real time Expectations

SAP

A to Z of OLE Excel in ABAP 7.4

ALV Report On SAP HANA

OLE Excel in ABAP 7.4: An All-Inclusive Guide for SAP Developers Let’s examine the SAP HANA: Opportunities and Challenges ALV Report. Everyone has been being cleared out by the HANA Tempest. According to a September 2017 SAP study, there were more than 1000 clients using S/4HANA at the time. Therefore, all professionals working on SAP would need to navigate the HANA waters tomorrow, if not immediately. ABAPers, who program ALV Reports every other week, will replace the SAP Professionals. Have you considered the relative advantages and disadvantages of planning an ALV report in SAP using HANA as the suite and data set?

ALV Reports are the Cockroaches of SAP world, which would survive every evolution.

The ALV’s roots, establishment, or starting place are the same in HANA World as they were in traditional data sets, such Choice SCREEN. Unfortunately, when we observe this, we frequently come to some conclusions. Checkboxes, radio buttons, choice screen blocks, and other features must be present on the screen. This is unfortunate since, on the one hand, Fiori Platforms feature stunning and dynamic screens with apps that improve Client Experience (UX) by using SAP UI5, and on the other, we have the standard ALV.

Rather cribbing about it, we want to recall that clients (actually) request ALV reports like standard T-Code yield for example ME2N (citing on the grounds that that was the prerequisite I got). Afterall everything isn’t about client experience. Complex business needs likewise get some weight.

Regardless, whether you are attempting to learn Fiori or SAPUI5, ALV reports can’t be supplanted. In this way, likewise begin investigating the new way you can make the ALVs.

How might we make our (ABAPers) lives merry and fascinating? Add HANA in with the general mish-mash and what you get is simpler to code (well not really) and all the more critically more prominent improvement in the exhibition.

The improvement in execution is exclusively credited to one thing that is the idea called “Code Push Down” or “Code to Information (Data set) Worldview”. Heard it anyplace? Try not to say No. We are at the twentieth part in our HANA ABAP Series.

What is Code Push Down? (ALV Report On SAP HANA – Opportunities And Challenges)

Here we have a tipping point. One can go for the strategy for utilizing Discs View alongside AMDP (if vital) or go with IDA. Utilizing IDA is much more straightforward than AMDP, yet possibly one can’t be a swap for the other. They play their own parts to play. In the following article, I will cover the distinctions and benefits of IDA against Albums.

Prior to looking down it would be smart to discover somewhat more about AMDP (ABAP Oversaw Data set System) and IDA (Coordinated Information Access).

So for ALV in HANA, we have the accompanying:

  1. Selection Screen
  2. Data is ready in CDS +/- AMDP

What next? Just connect them.

3. Applying selection screen criteria into CDS view entries.

The third step is a piece precarious. We again have various open doors here.

3.1 Either pass all the determination screen channels into AMDP ( NOT Compact discs View as a result of the way that Cds Perspectives are defined and can’t take more than one incentive for a solitary field and choice screen of the ALV report has select choices which are in range tables)

OR

3.2 Get every one of the passages from Compact discs View into your Application Layer and afterward continue with regular coding practice.

At this point, experienced ABAPers would agree that that first methodology (AMDP) would do every one of the positive qualities regarding execution.

Now we have narrowed down to:

  1. Choice Screen
  2. Information is prepared in Discs +/ – AMDP
  3. Applying choice screen measures into Discs view sections utilizing AMDP and bringing just required passages into AS layer and continuing with regular SALV manufacturing plant class utilizing Oh no.

Technical Points:

  1. Conversion of SELECT-OPTIONS into Dynamic “WHERE CLAUSE”: When the standard determination screen is constructed, the main obstacle is incorporate the select choices into AMDP. To accomplish that we have the accompanying code piece:
DATA(lv_where) = cl_shdb_seltab=>combine_seltabs(
it_named_seltabs = VALUE #(
( name = 'MATNR' dref = REF #( so_matnr[] ) )
( name = 'EBELN' dref = REF #( so_ebeln[] ) )
) ).

Trust you can grasp the above code. Else, the beneath elective for a similar activity can assist you with bettering.

cl_shdb_seltab=>combine_seltabs(
EXPORTING
it_named_seltabs = VALUE #(
( name = 'MATNR' dref = REF #( so_matnr[] ) )
( name = 'EBELN' dref = REF #( so_ebeln[] ) )
)
RECEIVING
rv_where = DATA(lv_where) ).

2. Using Dynamic where clause in AMDP: The following test is to utilize the where condition. There is an element in SAP AS 7.40 and higher of “APPLY Channel”. The lv_where statement worked above is passed to AMDP technique boundary ip_filters.

Conclusion: ALV Report On SAP HANA – Opportunities And Challenges

Making the most of HANA DB and HANA instruments like HANA Studio we enjoy following benefits ( opportunity ):

  1. Since there is code push down and a greater portion of the information bringing is completed at HANA DB alongside collections, totals, and midpoints, the execution was further developed.
  2. Powerful on-the-fly custom naming of the ALV result fields [may be completed with CDS].
  3. Dynamic SELECT questions in AMDP based on the data provided by the client and the content stored in the database [for example, if the database contains columns for City and Country, we may use the CASE articulation to conclude whether or not the input city provided by the client is the capital].
  4. Get rid of it for every section. [Instead, use internal joins]. Have we just found ourselves in yet another predicament?.

The opposite side of the story, challenges:

  • At the point when we go with Discs Perspectives to extricate information into AS layer, then, at that point, there might be still some presentation issues (despite the fact that Cds relics would in any case give great exhibitions, still some unacceptable utilization of Cds can blow up).

Kindly trust that the following article will get a brief look at the genuine code to exhibit all the abovementioned and IDA. Along these lines, if it’s not too much trouble, remain tuned and get yourself HANA-tized.

Now we want to hear from you.

Kindly leave your input, stories and speedy remarks beneath.

YOU MAY LIKE THIS

Auto Refresh ALV Using CL_GUI_TIMER

Courses For Sap ABAP On HANA Training

Oracle cloud for manufacturing

SAP ABAP Interview Questions Real time Expectations

SAP

Creating Dynamic Internal Table

Creating dynamic internal table in ABAP In one of our post, we showed the use of Dynamic Where Condition . In this article, Creating Dynamic Internal Table we would show one out of the numerous ways of creating Dynamic Inward Table and show it in ALV yield.

Let’s assume you have a necessity where you need to show a report to demonstrate one Material is available in the number of Plants. Say your feedback material ‘M1’ is available in two plants say ‘P1’ and ‘P2’. So the result ALV report ought to show just two three segments, M1, P1 and P2. Let’s assume you have another material ‘M2’ which is available in 5 plants ‘P1’, ‘P2’, ‘P3’, ‘P4’ and ‘P5’. Then the result table would have six segments. M1, P1, P2, P3, P4 and P5.

Make a note, the quantity of sections are changing in view of the information. Allow us to see a genuine model. Creating Dynamic Internal Table.

Check the MARC table.

CREATE_DYNAMIC_TABLE

You can also read for:- ABAP for SAP HANA. ALV Report On SAP HANA – Opportunities And Challenges

Above screen capture shows that Material ‘100522’ is available in two plants. Our ALV would show as underneath.

Check the MARC screen capture, Material ‘100567’ is available in four plants. Our ALV would show as beneath.

Did you see, the quantity of segments are changing powerfully according to the information? This should be possible in numerous ways, yet the most helpful way is to make dynamic design/inner table and show it.

Capability Module ‘DDIF_FIELDINFO_GET’ would assist us with getting table field data. Really take a look at the code beneath, we are supplanting ‘MARC-WERKS’ field name, with the genuine Plant number. This was only a particular undertaking prerequisite. You could have another prerequisite.

Dynamic Internal Table

Material is a decent segment yet Plants are dynamic in view of information from MARC. Check we are circling through the interior table and utilizing FM ‘DDIF_FIELDINFO_GET’ to decide and populate field index data.

When we have the field index (i_fcat), we want to construct the unique inside table with the not entirely set in stone by i_fcat. For this model, we are utilizing technique ‘CREATE_DYNAMIC_TABLE’ of class CL_ALV_TABLE_CREATE.

———————————————————–

Updated: 19th Dec 2017 – Feedback from Steve

Consider adding:
I_LENGTH_IN_BYTE = ‘X’
to the CALL METHOD cl_alv_table_create=>create_dynamic_table statement
I had a problem where I needed the dynamic table to create a p(7)/3, without that additional statement it calculates a P(4)/3.

———————————————————–

CREATE_DYNAMIC_TABLE

The under two stages are the main ones. Here we are allocating the unique construction to the <field-symbol> table and <field-symbol> workspace which would be utilized later to show the ALV.

* Assign the structure of dynamic table to field symbol
ASSIGN i_dynamic_table->* TO <i_dyn_table>.

* Create the dynamic work area
CREATE DATA wa_dyn_line LIKE LINE OF <i_dyn_table>.
ASSIGN wa_dyn_line->* TO <wa_dyn>.

There is some mathematic done to stamp ‘X’ for the segment where the material is available. So don’t be confounded. In troubleshooting, that’s what it shows despite the fact that MATNR has 18 characters, the unique table show 36 (simply the twofold). Same with Plant, it shows 8 rather than 4. Thus, this is the sort of thing you need to check before you put your information.

Whenever you have populated the information in the powerful inside table, showing information in ALV is a cake walk. Simply utilize the FM ‘REUSE_ALV_GRID_DISPLAY’.

Really look at the code conduct in Troubleshooting mode”

Dynamic Internal Table

Check I_FCAT table, it has 4 columns of fields. This implies, the unique interior table would have 4 segments. One fixed for Material and 3 dynamic for plants.

CL_ALV_TABLE_CREATE

This is the class and technique which really makes the powerful inward table.

Dynamic Internal Table

Check I_DYNAMIC_TABLE, it has now 3 segments for plants. This is the construction you want. Presently make the inward table and workspace and populate your last information and show it.

CL_ALV_TABLE_CREATE

Allow us to see, how the result would look like when we input 3 materials which are accessible in different plants.

Check, the quantity of plant segments are the association of the multitude of three materials. Isn’t it dynamic?

Kindly track down the functioning system for the above prerequisite here.

REPORT elearning. 
*----------------------------------------------------------------------*
* Created by   : eLearning (https://eLearning.com/)                    *
* Purpose      : Program to show Dynamic Internal table                *
* Visit https://eLearning.com/ for SAP Technical Tips & Solutions     *
*----------------------------------------------------------------------*
*---------------------------------------------------------------------*
* POOLS                                                              *
*---------------------------------------------------------------------*
TYPE-POOLS: slis.
*---------------------------------------------------------------------*
* TABLES                                                              *
*---------------------------------------------------------------------*
TABLES: mara.
*---------------------------------------------------------------------*
* TYPES
*---------------------------------------------------------------------*
TYPES: BEGIN OF x_data,
         matnr TYPE matnr,
         werks TYPE werks_d,
       END OF x_data.
*---------------------------------------------------------------------*
*  DATA                                                               *
*---------------------------------------------------------------------*
DATA:
* Internal tables
  i_data          TYPE STANDARD TABLE OF x_data,
  i_data_temp     TYPE STANDARD TABLE OF x_data,
  i_fcat          TYPE lvc_t_fcat,
  i_dynamic_table TYPE REF TO data,
  i_plant         TYPE STANDARD TABLE OF x_plant,
  i_fieldcat      TYPE slis_t_fieldcat_alv,

* Work ara
  wa_fcat         TYPE lvc_s_fcat,
  wa_dyn_line     TYPE REF TO data,
  wa_plant        TYPE x_plant,
  wa_data         TYPE x_data,

* Variable
  v_field_name    TYPE fieldname,
  v_tabix         TYPE sytabix,
  v_fieldname     TYPE fieldname,
  v_seltext       TYPE scrtext_l.
*---------------------------------------------------------------------*
*  Field Symbols                                                      *
*---------------------------------------------------------------------*
FIELD-SYMBOLS:
  <i_dyn_table>   TYPE STANDARD TABLE,
  <i_final_table> TYPE STANDARD TABLE,
  <wa_dyn>        TYPE any,
  <wa_final>      TYPE any.
*---------------------------------------------------------------------*
* SELECTION SCREEN                                                    *
*---------------------------------------------------------------------*
SELECT-OPTIONS: s_matnr FOR mara-matnr.
*---------------------------------------------------------------------*
* INITIALIZATION                                                      *
*---------------------------------------------------------------------*
INITIALIZATION.
* Select data
*---------------------------------------------------------------------*
* START-OF-SELECTION.                                                 *
*---------------------------------------------------------------------*
START-OF-SELECTION.
  PERFORM sub_slect_data.

*---------------------------------------------------------------------*
* END-OF-SELECTION.                                                   *
*---------------------------------------------------------------------*
END-OF-SELECTION.
* Populate the dynamic columns needed for each run
  PERFORM sub_populate_catlog.

* Build the dynamic internal table
  PERFORM sub_build_int_table.

* Build ALF Field Catalog information
  PERFORM sub_alv_field_cat.

* Display data
  PERFORM sub_display_data.

*---------------------------------------------------------------------*
* SUB ROUTINES                                                        *
*---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Form  SUB_SLECT_DATA
*&---------------------------------------------------------------------*
FORM sub_slect_data .

  SELECT matnr werks
    INTO TABLE i_data
    FROM marc
    WHERE matnr IN s_matnr.
  IF sy-subrc EQ 0.
    SORT i_data BY matnr.

    i_data_temp[] = i_data[].
    SORT i_data_temp BY werks.
    DELETE ADJACENT DUPLICATES FROM i_data_temp
    COMPARING werks.
  ENDIF.

ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  SUB_POPULATE_CATLOG
*&---------------------------------------------------------------------*
FORM sub_populate_catlog .
  v_field_name = 'MATNR'.
* There is one Material column
  PERFORM sub_pop_field_catlog USING v_field_name.

  v_field_name = 'WERKS'.
* There would be 'N' number of dynamic Plant columns
* depending on the material and plants combination
  LOOP AT i_data_temp INTO wa_data.
    PERFORM sub_pop_field_catlog USING v_field_name.
  ENDLOOP.
ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  SUB_POP_FIELD_CATLOG
*&---------------------------------------------------------------------*
FORM sub_pop_field_catlog  USING    p_l_field_name TYPE fieldname.

  DATA: l_i_dfies  TYPE STANDARD TABLE OF dfies,
        l_wa_dfies TYPE dfies.

* Call FM
  CALL FUNCTION 'DDIF_FIELDINFO_GET'
    EXPORTING
      tabname        = 'MARC'
      fieldname      = p_l_field_name
    TABLES
      dfies_tab      = l_i_dfies
    EXCEPTIONS
      not_found      = 1
      internal_error = 2
      OTHERS         = 3.
  IF sy-subrc EQ 0.

    CLEAR l_wa_dfies.
    READ TABLE l_i_dfies INTO l_wa_dfies INDEX 1.
    CLEAR wa_fcat.
* Since we want the Plant number to be the header text
* Replacing the field name with actual plant value
    IF v_field_name = 'WERKS'.
      l_wa_dfies-fieldname = wa_data-werks.
    ENDIF.

    MOVE-CORRESPONDING l_wa_dfies TO wa_fcat.
    APPEND wa_fcat TO i_fcat.
  ENDIF.

ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  SUB_BUILD_INT_TABLE
*&---------------------------------------------------------------------*
FORM sub_build_int_table .

* Prepare the dynamic internal table with required columns of each run
  CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog           = i_fcat
    IMPORTING
      ep_table                  = i_dynamic_table
    EXCEPTIONS
      generate_subpool_dir_full = 1
      OTHERS                    = 2.
* Assign the structure of dynamic table to field symbol
  ASSIGN i_dynamic_table->* TO <i_dyn_table>.

* Create the dynamic work area
  CREATE DATA wa_dyn_line LIKE LINE OF <i_dyn_table>.
  ASSIGN wa_dyn_line->* TO <wa_dyn>.


ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  SUB_ALV_FIELD_CAT
*&---------------------------------------------------------------------*
FORM sub_alv_field_cat .

* Build field catalog for Material
  PERFORM sub_fill_alv_field_cat USING
        'MATNR' '<I_DYN_TABLE>' 'L' 'Material Number' 36.

* Number of Plant columns would be dynamic for Plants
  LOOP AT i_data_temp INTO wa_data.

    v_fieldname = wa_data-werks.
    v_seltext =   wa_data-werks.

    PERFORM sub_fill_alv_field_cat USING
              v_fieldname '<I_DYN_TABLE>' 'L' v_seltext 8.

  ENDLOOP.
ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  SUB_FILL_ALV_FIELD_CAT
*&---------------------------------------------------------------------*
FORM sub_fill_alv_field_cat  USING
                             p_fldnam    TYPE fieldname
                             p_tabnam    TYPE tabname
                             p_justif    TYPE char1
                             p_seltext   TYPE dd03p-scrtext_l
                             p_outlen    TYPE i.

  DATA l_lfl_fcat TYPE slis_fieldcat_alv.

  l_lfl_fcat-fieldname  = p_fldnam.
  l_lfl_fcat-tabname    = p_tabnam.
  l_lfl_fcat-just       = p_justif.
  l_lfl_fcat-seltext_l  = p_seltext.
  l_lfl_fcat-outputlen  = p_outlen.

  APPEND l_lfl_fcat TO i_fieldcat.

  CLEAR l_lfl_fcat.

ENDFORM.

*&---------------------------------------------------------------------*
*&      Form  SUB_DISPLAY_DATA
*&---------------------------------------------------------------------*
FORM sub_display_data .

  DATA: l_count     TYPE i,
        l_factor    TYPE i,
        l_wa_layout TYPE slis_layout_alv.

  LOOP AT i_data INTO wa_data.

    CLEAR: l_factor, l_count.

    READ TABLE i_data_temp WITH KEY werks = wa_data-werks
    TRANSPORTING NO FIELDS
    BINARY SEARCH.
    IF sy-subrc EQ 0.

      <wa_dyn>+0(18) = wa_data-matnr.
      l_factor = sy-tabix - 1.
      l_count = 36 + ( 8 * l_factor ).

      <wa_dyn>+l_count(8) = 'X'.

      AT END OF matnr.
        APPEND <wa_dyn> TO <i_dyn_table>.
        CLEAR <wa_dyn>.
      ENDAT.
    ENDIF.

  ENDLOOP.

  l_wa_layout-colwidth_optimize = 'X'.
  l_wa_layout-zebra = 'X'.

* Funtion module for displaying the ALV report
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      is_layout          = l_wa_layout
      it_fieldcat        = i_fieldcat
    TABLES
      t_outtab           = <i_dyn_table>
    EXCEPTIONS
      program_error      = 1
      OTHERS             = 2.


ENDFORM.

If you have any desire to get such commonsense changes and deceives directly to your inbox, kindly Buy in. We regard your security and view safeguarding it in a serious way.

In the event that you loved this post, kindly hit the offer buttons. If it’s not too much trouble, similar to us at facebook and support us. Assuming that you have any ideas, analysis, remarks or questions, kindly remark or connect with us.

Many thanks for your time!!

YOU MAY LIKE THIS

ALE and IDoc in SAP ABAP: A Deep Dive

Parallel cursor in SAP ABAP

Epic Evolution of ABAP Programming

SAP

Dynamic Where Condition usage in Database queries

SQL Tips: Dynamic WHERE Condition in Database Queries Let’s begin by discussing how to use dynamic where conditions in database queries. We desire Dynamic Where Condition for data set (DB) inquiries, but there aren’t many changes. Importance: Your software may determine during runtime which fields in the database table should be used for the DB query. To support such Dynamic Where Conditions, we can write our own unique code. In any case, we are aware of the effort and suffering required to write such a code. Thankfully, we can fulfill the requirement by using the Standard SAP capability module CRS_CREATE_WHERE_CONDITION. Using dynamic where clauses in database queries

Test Model:

We should think about it because we have a program that can comprehend part of the reasoning. Finally, it concludes that, in light of the fields MATNR (Material Number) and MTART (Material Sort), it should do an inquiry on the Data Set table MARA. The question can be asked in a few other possible fields, and the selection will be decided at runtime. Until run time, the table fields and their comparison values are unknown. Therefore, a dynamic where condition is what we truly want for the data set inquiry. Under such circumstances, you may choose to look at every possible combination of fields that could be used in the where condition and compose your custom code to produce a Dynamic Where Condition or you can simply utilize a Capability Module (FM) which will finish the work you.

You can also read for:- list of data types in sap abap

We will examine what is going on thinking about a program, with a determination screen having both the fields MATNR and MTART. (Allow us to accept these two fields and their comparing values won’t be accessible until runtime). If it’s not too much trouble, note, this program is composed to make sense of the Dynamic Where Condition. In real venture, you wouldn’t have the boundaries in determination screen. You may very well know the table and field name and values in those fields would be populated at runtime.

For straightforwardness, we have made these fields as a component of determination screen to populate our Dynamic Where Condition.

* Types
TYPES: BEGIN OF x_mara,
         matnr TYPE matnr, "Material Number
         mtart TYPE mtart, "Material Type
       END OF x_mara.

DATA:
* Internal table
  l_i_range  TYPE STANDARD TABLE OF crmselstr,
  l_i_output TYPE STANDARD TABLE OF mcondition,
  l_i_mara   TYPE STANDARD TABLE OF x_mara,

* Work area
  l_wa_range TYPE crmselstr,

* Variable
  v_matnr    TYPE mara-matnr,
  v_mtart    TYPE mara-mtart.
* Selection Screen
SELECT-OPTIONS: s_matnr FOR v_matnr,
s_mtart FOR v_mtart.

* For Select Option 1
LOOP AT s_matnr. "Looping to get multiple (single) values
  l_wa_range-table = 'MARA'. "Name of the DB table
  l_wa_range-field = 'MATNR'. "Field name the user has selected
  l_wa_range-sign = s_matnr-sign. "Sign
  l_wa_range-option = s_matnr-option."option
  l_wa_range-low = s_matnr-low. "Lower Value
  l_wa_range-high = s_matnr-high. "Higher Value
  APPEND l_wa_range TO l_i_range.
ENDLOOP..

* For Select Option 2
LOOP AT s_mtart. "Looping to get multiple (single) values
  CLEAR l_wa_range.
  l_wa_range-table = 'MARA'. "Name of the DB table
  l_wa_range-field = 'MTART'. "Field name the user has selected
  l_wa_range-sign = s_mtart-sign. "Sign
  l_wa_range-option = s_mtart-option. "option
  l_wa_range-low = s_mtart-low. "Lower Value
  l_wa_range-high = s_mtart-high. "Higher Value
  APPEND l_wa_range TO l_i_range.
ENDLOOP.
IF NOT l_i_range[] IS INITIAL.

* Call the FM to create the Dynamic Where condition
  CALL FUNCTION 'CRS_CREATE_WHERE_CONDITION'
    TABLES
      ti_range      = l_i_range
      to_cond       = l_i_output
    EXCEPTIONS
      invalid_input = 1
      OTHERS        = 2.

  IF sy-subrc = 0.

* Special way to write the query
    SELECT matnr "Material Number
    mtart "Material Type
    FROM mara
    INTO TABLE l_i_mara
    WHERE (l_i_output).

    IF sy-subrc = 0.

    ENDIF.

  ENDIF. "IF sy-subrc = 0: SELECT matnr mtart

ENDIF. "IF NOT l_i_range[] IS INITIAL.

Please note above: The Dynamic Where Condition table has to be put in brackets during the SELECT statement

WHERE (l_i_output).

Let us check the values in debug mode.

In choice screen we gave two qualities to material number field and one worth to material sort.

Dynamic ABAP

Check the range internal table l_i_range has data from two fields.

Dynamic Where Condition

Function module CRS_CREATE_WHERE_CONDITION smartly converts the data to Dynamic Where Condition in internal table l_i_output.  Isn’t this cool? 

Dynamic Where Condition

Why would it be wise for us to set aside time to write code to put up our own Dynamic Where Condition at the moment when SAP has provided this FM? You now know which FM to contact the next time you need a Dynamic Where Proviso..

Much thanks for your time!!

YOU MAY BE INTERESTED IN

How to Convert JSON Data Structure to ABAP Structure without ABAP Code or SE11?

Best Practices for SAP ABAP Development: A Comprehensive Guide

A Comprehensive Guide to SAP ABAP Training Online

SAP

Pop Up Debugging [ROBO 2.0]

Only a few years ago, we explained how to use a scratchpad to investigate the Spring Up Screen. Please take a look at this instructional exercise on Spring Up Troubleshooting Stunt. ROBO [Pop Up Troubleshooting By Notebook File] is the moniker I gave it. Simply ROBO. Don’t ask me what it means, please. Let’s get started with ROBO 2.0 Pop Up Debugging..

In this article, Pop Up Debugging [ROBO 2.0] we will attempt to make sense of another methods of Spring Up Troubleshooting utilizing SAP Easy route

  1. ROBO 2.0 [PopUp Debugging by SAP Shortcut ]
  2. ROBO Chitti [ Pop Up Debugging by SAP Shortcut with More Ease ]

1. ROBO 2.0 [ Pop Up Debugging By SAP Shortcut ]

We accept, the greater part of us are familiar with Spring Up Troubleshooting with SAP Easy route. In any case, on the off chance that you don’t know, let me tell the best way to make and utilize SAP Easy route to Troubleshoot SAP Spring Up. This is my ROBO 2.0 (nothing official about it) :P.

SAP Shortcut creation Steps as below.

You can create shortcut from any screen

Type = ‘System Command’; Transcation = ‘/H’; Location = ‘Desktop’ (wherever you want)

Presently we will perceive how might we utilize a similar SAP Easy route to Troubleshoot the Spring Up!.

Step:1 [ I have a screen where I have to debug the Pop Up ]

Step:2 I limited every one of my applications by utilizing Window + D alternate route then I held and hauled the SAP alternate way which I made in above advances and moved or explored to Drain GUI Application that was at that point opened in Taskbar Level for example as beneath

That’s it.

2. ROBO CHITTI [ Pop Up Debugging by Shortcut with more Ease ]

We created a SAP alternate route up till this point, moved out of the work area, dropped something comparable on Spring Up, and fixed it. There is an issue with restricting the number of meetings that may be held, figuring out the quickest way, and then dragging it to the spring screen. If everything else is equal, we can make the interaction easier by sticking the GUI alternate path to the taskbar. The simplest way to nail any application to the taskbar is to right-tap it and pin it to the taskbar. You can also use other methods you are familiar with. When the other option isn’t working, launch the SAP GUI application that has to be looked into. This time it is easier.

You can also read for:- Advance SAPUI5 – Integration of Google Maps JavaScript API with SAPUI5 App

Simply drag the alternate way you have stuck to the spring up screen.

I want to believe that you previously sorted out the benefit of this technique. Don’t bother limiting all applications [with Window + D] to move the SAP Easy route on to Spring Up and don’t bother agonizing over exploring to Drain GUI Application by holding the alternate way. Just we can drag a similar easy route (Upwards) from Errand Bar and Drop it on to ‘Spring Up.’

I have no doubt that many of you were somewhat aware of both of these methods. Nevertheless, because nobody can truly know, we genuinely thought about posting this because it might enlighten some young or old minds..

YOU MAY LIKE THIS

10 Real-World SAP ABAP Programming Examples (with Code!

Building custom SAP Fiori applications for improved sales efficiency

Back-End Development

SAP

Easy Trick to Disable Hold Button in PO (ME21N) using BADI

I want to share a simple trick to make use of a BAdI and disable Hold button in Purchase Order Creation (t-code ME21N). Let’s go deep into the Easy Trick to Disable Hold Button in PO ME21N using BADI.

  • On initial step, ensure Keep button actually exists. Check the Hold featured in yellow.
  • Open BAdI Developer through T-Code SE19. On BAdI Developer screen, pick Exemplary BAdI, on BAdI name segment fill ME_HOLD_PO and afterward click on Make Impl. button. In this step, we duplicate default standard BAdI which is ME_HOLD_PO into our BAdI name.
  • Input execution name as our BAdI name, remember to begin your BAdI Execution name with Z or Y, for instance I utilized ZHOLDPO name for my BAdI name.
  • Input some text for the BAdI Execution depiction.
  • Remember your BAdI Execution for a bundle and dole out into a vehicle demand to ship it to Quality and consequently to Creation framework.
  • Click on Point of interaction Tab, and afterward Double tap on Technique IS_ALLOWED.
  • It opens the ABAP Supervisor. To see existing boundary, simply click signature button.
  • We can see boundary CH_ALLOWED. We want to utilize this boundary to cripple Hold Button in the PO. Put your code among strategy and endmethod. We have hard-coded CH_ALLOWED with invalid worth. It implies Hold button won’t exist any longer. Remember to Enact your BAdI Execution.
  • Simply press enter on spring up, this spring up seems on the grounds that there is one more article with inert status.
  • Simply ensure your code is enacted. Click back on back button.
  • In any case, BAdI status is as yet latent, and Runtime Conduct is “Execution won’t be called”. You can definitely relax, it implies BAdI was not executed as expected. We simply have to Enact the BAdI Execution here.
  • After enactment of BAdI Execution, status will be Dynamic and Runtime Conduct will be “Execution will be called”.
  • Last step. How about we approve our adjustment of the PO screen. Bingo!! The Hold button which you found in the absolute first screen capture, doesn’t exist. Presently, go an illuminate the business group who requested it. Your task is finished for the afternoon.

This is a basic arrangement once you track down it. In any case, when you don’t have a clue about the BAdI name, you need to scramble around and google. Easy Trick to Disable Hold Button in PO ME21N using BADI.

YOU MAY LIKE THIS

How to check your custom ABAP code for SAP BTP ABAP Environment

10 Real-World SAP ABAP Programming Examples (with Code!)

Number Range tcode in SAP

Create and Consume Business Add-in(BAdI) in ABAP

× How can I help you?