Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all 935 articles
Browse latest View live

2D and 3D Reports using Graph Matrix Function Module

$
0
0

SAP Business Graphics is a graphics program for generating two- and three-dimensional graphs.  SAP support for 2D and 3D reports are very nice, but they are hardly used by programmers. There are many standard  functions for graphical display especially for making MIS reports more friendly.  Here the function modules GRAPH_MATRIX_2D and GRAPH_MATRIX_2D are used to generate 2D and 3D reports. Sample code is also provided.

View this Document


Getting Started with SAP NetWeaver BW 7.4 on SAP MaxDB

$
0
0

This guide describes how to set up your local environment for the BW 7.4 on SAP MaxDB trial provided as virtual appliance by the SAP Cloud Appliance Library.

View this Document

Comgroup Boosts Developer Productivity

$
0
0

Take a fresh take on application development with ABAP development tools for Eclipse. Do as Wrth Group, global leader in mechanical fasteners, does: foster customer intimacy,deliver quality products on schedule, and keep tabs on costs. Precision-tuned applications are key to the group's success. Comgroup GmbH,its IT service provider, achieved a major boost in productivity by utilizing development tools for the ABAP programming language in Eclipse.

View this Document

ALV Object Model - Hierarchical Sequential List - The Basics

$
0
0

In this tutorial, you will learn the basic steps to create a hierarchical-sequential list using the ALV Object Model.

View this Document

ABAP String Search Tool

$
0
0

Developers commonly need to search for a string throughout a number of selected programs. This code sample will help you do just that.

View this Document

Validate data in Table Maintenance Generator event

$
0
0

The TMG event 01: Before Save., can be used instead of going for event 05: New Entry if you have validation process to do.


The problem with event 05 is that, control goes into the include/form only on the newly created entries. So, if you have you had to change any existing data, the control will not pass through the validation code !!


Here is a piece of code that you can use for your development purpose.


Here,

  • <action> is a flag that will have values as 'N' if a new entry is made or as 'U' if existing entry is modified.
  • <vim_total_struc>is a structure that holds the current looped value on TOTAL table.
  • it_total_zdata, internal table should be of type table z-table.


LOOP AT total.

  IF <action> EQ 'N' OR <action> EQ 'U'.

    APPEND <vim_total_struc> TO it_total_zdata.

  ENDIF.

ENDLOOP.


IF it_total_zdata[] IS NOT INITIAL.

* Perform validation

    LOOP AT it_total_zdata.

      IF it_total_zdata-name NE 'TESTNAME'.

        MESSAGE 'Name is not TESTNAME' TYPE 'S' DISPLAY LIKE 'E'.

        vim_abort_saving = c_abrt_save.

        sy-subrc = 4.

        EXIT.

      ENDIF.

    ENDLOOP.

ENDIF.


IMPORTANT POINTS  !!

  • Message should be of type 'S'. If not, the screen returns to SM30, which looks bad !! Make sure its displayed either as 'Error' or 'Warning'.
  • vim_abort_saving has to be set to 'X' to avoid data being saved. (Since the message popped is of type 'S', control proceeds further!!)
  • Set sy-subrc as '4' which stops further processing.


The above points are mandatory, if you want a message to be popped and wrong data still to be seen giving an opportunity to the user to rectify.

Adding Extra Fields At MCBE T-Code(Material Analysis) And Pick Data from Marc.

$
0
0

Hi,

Some days before, I seen one post, adding Extra fields in MCBE(Material Analysis) At Standard T-Code, the person want to Add one extra field and he need to pick the data from the Marc table.(This is the Actual Requirement to him But he has not got any replies) So, The below document explains, the details about How to add columns and how to fetch data from Marc Table.

 

Task: Adding extra field in MCBE Report and Fetch the Maintain. Status (PSTAT) Field From the MARC table.

 

Step1: First We need to add field, for displaying in the report Layout , for this  We need to check, At which place Fields to be add.

 

s1.jpg

Step2: Go to Se11  and open the Structure  s039  and Append the structure In my case, i need only one field, I was added  maintain status field of Marc Like

   Below.

  .s2.png

 

Stpe3: Now Open the MCBE and  Check the Layout , You can able to see the New field

s3.png

Step4: Before Moving moving or enabling the column You have to do One more task. In the table TMC73  We need to maintain the column into the table. Other wise. the Newly added column will not activated You will get error message While moving from Left to Right.

s4.png

 

   Once Complete the above task You can move the column from Left to right. The column will be appear but there is not data. Now we need to write the code

   for getting the data from Marc. And need to append the standard Internal table declaration in the Source Code.

 

Step5: RMCB0300 This is the main program of the T-Code MCBE. It is having some included, Open the Main program and have a look At Include

           RMCB01TP  It is having declaration and Structures(Through the Enhancement spot we can write the code). If we wont do this step, The newly added              columns will not show in the source code.Exactly At the End of the Structure Declaration You need to add newly added column at Structure aus_s000.            Just have a  look on below image.

          s6.jgg.JPG

  We need to append one more place also in the code. As per the Standard source code. Please have a look below attached image. And Translate the      Highlighted Text to English You can understood. Why we are adding the structure in two places And activated the Enhancement spot in the code.

            s7.jpg

    Step6: Now Through the Custom Exit We can Fetch the data from the Marc and we can Make communicate to the Final internal table of the
    Standard Code.

    Custom Exit name : MCR00002 => Standard analyses: Key figure display
    Function Exit Name : EXIT_SAPLMCS2_001
    Include Name:  ZXMC0U03

   

    Create  a Project At Cmod And enable the include . And put the break point and check it. Whether the code is triggering or not.

             s8.jpg

 

Step7:  By using the Field Symbols We Can get the Material Code, From the Source code,

 

field-symbols : <fs_mc51> type any,

                 <fs_zzstatus> type pstat_d. 

 

field-symbols:<fs_dmatnr> type any.

data: stat type s039-zzstatus.

loop at t_aus_s000 assigning <fs_mc51>.

    assign component 'objekt' of structure <fs_mc51> to <fs_dmatnr>.  "for getting material code from the standard source code

   select single pstat from marc into stat where  matnr eq <fs_dmatnr>.  "fetching from pstat  from marc input matnr output pstat

    assign component 'zzstatus'  of structure <fs_mc51> to <fs_zzstatus>.  "assing the zzstatus exactly like s039

    <fs_zzstatus> = stat.

endloop.

 

 

Step 8: In debugging check it, Whether it is, maintain status field value is picking from the marc or not.  The result will be look like below.

             ff.jpg

       

       

 

  

     Regards,

     NewB

How to include ABAP Quick Search into NWBC

$
0
0

Follow these 7 easy steps to include the search in your Business Client:

For functionality, see: ABAP Quick Search for NWBC

 

0. Please check the system requirements: SAP Netweaver Release 7.4 or higher.

    Furthermore, not all functions will work with NetWeaver Business Client 4.

 

1. Copy the content of the "Program.txt" to a new Program and replace the placeholder with an appropriate program name. (e.g. "zrep_object_opener")

 

2. a) Create a transaction with an appropriate transaction code (e.g. "z_object_opener") like this (select "Program and selection screen..."):

Create Transaction.PNG

2. b) Change the transaction so that it starts the program you created in step 1.

Create Transaction2.PNG

3. Upload the file "resultpage.html" to a new folder in the MIME Repository:

Upload Resultpage.png

Don't forget to activate it

 

4. a) Copy the content of the file "Search_Class.txt" to a new class and replace the placeholders with an appropriate class name. (E.g. zcl_nwbc_abap_search)

 

Meth_Descr.PNG

 

4. b) Change the constant "cv_opener_transaction" to the name of the transaction you created in step 2 (e.g. " 'z_object_opener' ").

 

4. c) Change the constant "cv_result_page" to the path of the .html-file you uploaded in step 3:

 

Clonstants2.PNG

4. d) If you want to edit the whitelist for result types, you can change it in the class-constructor method.

 

5. a) Start the transaction 'SICF' and create a new service (via New Sub-Element).

Create Service.PNG

5. b) Enter a description and add the search class you created in step 4 to the handler list. Don't forget to activate it.

Create Service2.PNG

6. Add a new search provider in your NWBC. Therefore go to Options --> Settings --> Connections --> Search Providers...

Type in the address and port of your server (you can find it here: Options --> Help --> About NetWeaver  Business Client --> System Information -> Server) and after that the path to the service you created in step 6 and "?type=OpenSearchDescription".

If you want to, you can add a "namespace" and/or "max_results" parameter, too, as shown here:

SearchProvider.png

7. Type something into the search bar and enjoy.


ABAP Quick Search for NWBC

$
0
0

In the SAP (Netweaver) Business Client you have a search bar in the upper range of the window. As soon as you type something in there, it tries to get search suggestions from all the defined so-calledsearch providers:

Context.png

It is possible to add own search providers. For more information, see: WKS: How to use NWBC in TM - Search Providers

 

The ABAP Quick Search for NWBC is such a search provider.

With that search you can easily search for all ABAP related content available on your system and open it with one click:

Example.png

 

Additional Features:

  • Results are sorted by type
  • Define a namespace and search it by typing "//"
  • Extra fancy result page

resultpage.PNG

  • Search for special result types by typing "\<object_type>" (see the list at the end of the posting or just type "\" and look at the type suggestions)
  • Decide how to open tables: Do you want to see the structure (SE11) or the content (SE16)?

Tables.png

  • Decide how to open BOBF Business Objects: In the BOBF Test UI or in BOBF Conf UI?

OpenBOBF.png

Unfortunately, not all functions work in NWBC 4.

 

 

If you want to have the search included into your Business Client, please follow the steps in this scn posting: How to include ABAP Quick Search into NWBC

 

Here is the standard list of result types for which is searched for. In case you want to search for a certain type, add \<object_type> to your search request.

E.g. "\CLAS" for classes.

 

ACIDCheckpoint Group
IWPRGW Service Builder Project
SAMCABAP Messaging Channel
SAPCABAP Push Channel
SPRXGeneric Proxy
BOBFBOPF Business Object
BOBXBOPF Enhancement Object
CLASClass
COBOBudiness Object
DEVCPackage
DOMAMain
DTELData Element
ENQULock Objects
FUGRFunction Group
FUGSFunction Groups
IAMLLanguage Dependent MIME Object
IAMUMIME Objects
IASPInternet Service
INTFinterface
MSAGMessage Classes
PARAUser Parameter
PINFPackage Interface
PROGInclude
RPDFReport Definition
SCATTest Case
SCGRService Group
SFBFBusiness Function
SFPFForm
SFPIInterface
SHLPSearch Help
SHMAShared Object Area Class
SMIMMime Objects
TABLDictionary
TRANTransactions
TTYPDictionary
TYPEDictionary
VIEWView
WDCAWeb Dynpro Application Configuration
WDCCWeb Dynpro Component Configuration
WDCPWeb Dynpro Chip
WDYAWeb Dynpro Application
WDYNWeb Dynpro Comp/INTF

Guides and Tutorials for the Developer Edition of AS ABAP incl. BW on SAP HANA

$
0
0

The Developer Edition of AS ABAP incl. BW on SAP HANA comes with pre-configured users and pre-installed sample applications. Thus, you can immediately start developing or trying out new capabilities and code samples. Please find below a list of guides and tutorials which are already implemented in or are applicable for this developer edition.

 

Remark: Some of these guides and tutorials can only be used on SAP HANA, others also apply to AnyDB systems, e.g. the AS ABAP on MaxDB trial. Thus, all guides and tutorials are labeled accordingly*.

 

SAP HANA Developer Guide [SAP HANA*]

This guide explains how to build applications using SAP HANA, including how to model data, how to write procedures, and how to build application logic in SAP HANA Extended Application Services (SAP HANA XS).

 

SHINE: SAP HANA Interactive Education [SAP HANA*]

SAP HANA Interactive Education, or SHINE, is a demo application that makes it easy to learn how to build

native SAP HANA applications. The demo application comes with sample data and design-time developer objects for the application's database tables, data views, stored procedures, OData, and user interface.

 

ABAP for SAP HANA Reference Scenario [SAP HANA*]

The ABAP for SAP HANA reference scenario offers guides and tutorials including a pre-installed sample application which guide you through the E2E development process and provide sample coding leveraging the code-pushdown paradigm on SAP’s in-memory database. For more information please visit the reference scenario home page or directly consult the corresponding how-to guide.


How to build Fiori Applications

This blog introduces the SAP Fiori Reference Applications.These applications demonstrate the development and UX Design guidelines and best practices applicable to the SAP Fiori development lifecycle. This covers the entire end-to-end process from design and technology to coding principles, from OData modeling to implementation, as well as selected product standards such as performance, and extensibility. The SAP Fiori Reference Apps are based on the Enterprise Procurement Model (EPM).

 

Developing a Java extension on SAP HANA Cloud Platform using JCo/RFC [AnyDB*]

In this tutorial you will develop a Java extension on SAP HANA Cloud Platform using a JCo/RFC connection to your ABAP system in the cloud or on-premise. The scenario used in this tutorial is based on the well-known SFLIGHT model.

 

Business Warehouse Scenarios [SAP HANA*]

The developer edition includes SAP Business Warehouse 7.4 which provides pre-activated sample scenarios for selected OLAP functions and integrated planning. Moreover, it contains predefined objects, such as InfoProviders, Queries and Workbooks. For more information please refer to this page or use transaction RSFC directly in the system.

 

How to implement an OData service with SAP NetWeaver Gateway [AnyDB*]

This how-to guide by Andre Fischer describes how to quickly create an OData service with SAP NetWeaver Gateway. You will learn how to create a data model based on a DDIC structure and implement the corresponding services using the OData channel programming model. For more information please download the how-to guide from SCN.

 

How to build SAPUI5/HTML5 applications consuming OData services [AnyDB*]

This blog by Bertram Ganz describes the end-to-end process required to develop a SAPUI5/HTML5 application user interface (with table, popup and ux3 shell) consuming a local OData service by SAP NetWeaver Gateway. The created OData service is based on the SAP NetWeaver Enterprise Sales and Procurement Model as a pre-installed demo/proxy application that provides a list of products as business data. For detailed instructions please download the how-to guide from SCN.

 

Real-time eventing using ABAP Channels

Using ABAP Push Channel– Web Socket implementation for ABAP – you can push in real-time any ABAP backend data changes to your Web UI and vice versa. With ABAP Messaging Channels your ABAP application can get notified about the processing status of other ABAP sessions and react without having to poll the database periodically for an updated status. And last but not least using both ABAP Push and ABAP Messaging Channels you can implement real-time collaboration. This blog introduces ABAP Channels and offers links to more blogs and video tutorials. Learn how to execute step-by-stepABAP Channels Demos in AS ABAP 7.5 Developer Edition.

ABAP Open Source projects

$
0
0

Because the old "SAP Code Exchange" plattform is dead since 2013, it isn't easy anymore to follow all of the great ABAP Open Source projects here on SCN and around the Internet.

 

Overview of these kind of projects as "single point of entry"

 

Project TitleDescriptionDocumentationProject Page
SAPlinkSAPlink is a project that aims to make it easier to share ABAP developments between programmers. It provides the ability to easily distribute and package custom objects.SAPlink User Documentation - ABAP Development - SCN WikiHome | SAPlink Project | Assembla
SAPlink Plug-insPlug-Ins for SAPlinkSAPlink plugin list | SAPlink Project | AssemblaHome | saplink-plugins Project | Assembla
SAPlink for ABAP Development ToolsSAPlink for ABAP in Eclipse brings ease of use to SAP Code Exchange ABAP developers.Installation Guide SAPlink for ABAP Development ToolsHome | SAPlink for ABAP in Eclipse Project | Assembla
abap2xlsxGenerate your professional Excel spreadsheet from ABAPabap2xlsx - Generate your professional Excel spreadsheet from ABAPabap2xlsx by ivanfemia
DOCXGenerate DOCX file in ABAPGenerate DOCX file in ABAP./.
zJSONThe JSON Document ClassUsage zJSON · se38/zJSON Wiki · GitHubse38/zJSON · GitHub
abap_fm_jsonJSON adapter for ABAP Function Modules.JSON Adapter for ABAP Function Modulescesar-sap/abap_fm_json · GitHub
TwibapThe ABAP Twitter APIHome · se38/twibap Wiki · GitHubse38/twibap · GitHub
Neo4aThe Neo4j ABAP ConnectorNeo4a: The Neo4j ABAP Connectorse38/Neo4a · GitHub
ZOAuthThe ABAP OAuth HandlerHome · se38/ZOAuth Wiki · GitHubse38/ZOAuth · GitHub
OAuth2Next generation authentication APIOAuth2: Next generation authentication APIivanfemia/abap2oauth2 · GitHub
CoDBapThe ABAP CouchDB APIHome · se38/CoDBap Wiki · GitHubse38/CoDBap · GitHub
moDBapThe ABAP mongo DB APIHome · se38/moDBap Wiki · GitHubse38/moDBap · GitHub
abapGitGit client for ABAPHome · larshp/abapGit Wiki · GitHublarshp/abapGit · GitHub
abapOpenChecksOpen source checks for SAP Code Inspector / ABAP Test CockpitHome · larshp/abapOpenChecks Wiki · GitHublarshp/abapOpenChecks · GitHub
ZAL11AL11 replacementZAL11 : a replacement for AL11./.
ZTOADOpen SQL EditorZTOAD - Open SQL editor ./.
ZLISTCUBELISTCUBE replacementLISTCUBE replacement : a new way to display data./.
ZMOCKUP_LOADERTest data loader for ABAP unit test. Prepare in Excel, save in TXT to ZIP, upload via SMW0.Unit testing mockup loader for ABAPsbcgua/mockup_loader · GitHub
RSS-Feed Provider in ABAPA class and sample program is provides to publish content from an ABAP based system as a RSS-feed. It could be used to display tickets from solution manager or status of transports from the CTS.Publishing Content  from the SAP Netweaver AS ABAP to iGoogle and other RSS Readerspeterlangner/zrss · GitHub

 

Please feel free to modify / add your project.

Enhancing Elementary search helps in SAP:search help exit for elementary search help

$
0
0

Very often we face requirements to influence the contents returned when f4 help is pressed.In case of collective search help we have procedures to influence the contents returned or write our own logic .

If there is no exits(after pressing F4) and your field in fact uses a elementary search help then also we can influence the contents returned  via source code plug in.

 

Let us take an example scenario: Requirement is to suppress few entries from desc of illness field (when F4 is pressed) in time of record creation at PA30 for a particular subtype .

 

PA30.jpg

Now if we need to supress specific entries from final output after F4 is pressed we can use an implicit enhancement point , location of the enhancement is shared below

 

SE19.jpg

Include: LSDSDF03

At end of subroutine  get_values_sh, before the endform statement we need to modify the value_tab internal table based on variable

SHLP-SHLPNAME which will contain the search help name for which F4 is pressed. Thus in our case when F4 is pressed for field UMSKD as search help for this field is  H_T572B so SHLP-SHLPNAME will contain H_T572B.

If we create an implicit enhancement before endform statement we can write our business logic to influence the end content returned when F4 is pressed.

 

This include is used whenever F4 help is pressed for any field so we need to be careful to influence only the fields we want, as stated we can simply do it using SHLP-SHLPNAME variable which will hold the search help exit.

 

Enhancement.jpg

Inside the block highlighted we can write our business logic . we need to validate it with the string column in value tab[] to determine which entries to be discarded.

 

This way we can overcome the setbacks when we need to influence elementary search help returns.

 

P.S: This is an alternate way to influence F4 help return list(particularly elementary search helps), In case any easier way do exist then kindly inform,

In case it is useful would like to hear in the scenarios it is utilized.

Building an SAP Query with ABAP Code

$
0
0

ABAP code is used with SAP query tool to enhance the query output.

 

You can write down the code under the Extras tab for the Infoset in the SQ02 Tcode.

 

SAP doc 1.PNG

 

You will find various coding events which are similar to classical ABAP report.

 

SAP doc2.PNG

 

The code written in this code area is transmitted to the auto generated query report. You can write down your code in various coding section as per the use of them.

  • DATA Section :

       Global Data Declaration will go under this Event.

  • INITIALIZATION Section :

       As the name suggests it is used to initialize the variable with initial values.

  • AT SELECTION-SCREEN OUTPUT :

       This event is triggered before the display of selection screen.

  • START-OF-SELECTION :

       This event is triggered before starting any database accesses. Usually Data fetching logic goes under it.

  • RECORD Processing :

        Corresponds to the GET coding with Info-sets without a logical database. As there is no hierarchical view of the data, all the join tables are addressed.

  • END-OF-SELECTION :

         The END-OF-SELECTION code consists of two parts (Before list output and After list output). The first part is processed before the list is output and the  second  part afterwards. It is the right section to do aggregated calculations and actions that can only be done when data from all the selected records has been extracted.

 

However, there is a problem when queries use code in the END-OF-SELECTION section in combination with the Sap List Viewer format. In short, the code is never reached.

  • Free Coding :

          The code under this event is executed after all the events are triggered.

 

 

Logic to put extra field in the query output:

 

Let you want a date field to be fetch from a 'B' table and has to be added to your query output.

Define a Structure in DATA Event:

data: begin of ty_date occurs 0,

                   date  like B-date,

                   end of ty_date.

 

The logic to fetch the values for this field will go under the record processing event.

In Record Processing Event write down the following code:

CLEAR ty_date.

CLEAR v_date.

Select date from B into table ty_date.                    "You can mention your condition also with where clause

Sort Table ty_date BY date DESCENDING.

Read Table ty_date INDEX 1.

v_date = ty_date-date.

 

Generate the Infoset.

 

Changes to the query:

1.Run SQ01 in another session.

2. Open your Query in change mode and select the field group in which has the added extra field.

3.Select extra field.

4 Click on basic list to select that field in your O/p list.

5.Click on Test button, and see if you are getting desired result.

 

Performing Operations on the final output table data:

 

You'll find table %G00 with final data to be displayed.

Enter the following ABAP code under Data Section:

    data: str type string.

   field-symbols: <G00> type table.

   field-symbols: <G00_WA> type any.

 

Enter the below ABAP code under END-OF-SELECTION(after list) Event:

   str = '%g00[]'.

   ASSIGN (str) TO <G00>.

   loop at <G00> assigning <G00_WA>.

   ...do whatever you like here....

   endloop.

You can put your own logic inside the loop to perform. .

      

Custom authorization in SQ01 Queries

$
0
0

Purpose

SQ01 Queries can be very helpful to provide the datas to the user but you can easily loose the control of the authorization.

 

Overview

We will see how we will adapt our Infoset in SQ02 to be able to make an authorization check based on the user input. The example is a simple query to display the material master records especially the costing information.

 

Let us begin

Create a selection criteria

 

At first we have to create a selection criteria. This will allow us to easily interact with the user Input. This has also the advantage that this input will be automatically available in all queries using this infoset.

Go to SQ02 and select your infoset.

Then go to extras

23-11-2015 15-33-41.jpg

And the click on the second tab Selections

23-11-2015 15-37-28.jpg

In the example we restrict the material master based on the valuation area. You can basically use all fields available in your infoset. It's important to fill the FOR field as this mention for which field the selection field will used as "Where" criteria in the SQL statement.

 

Implement our check

For this go to the second tab "Code". Select the Start-of-selection event

.

This first check is a global check if the user is at all authorized to display the costing view of the item. On error a blocking message is directly issued.

23-11-2015 15-58-00.jpg

Then we select all possible plant based on the user selection.

23-11-2015 16-00-59.jpg¨

Once we got it we can delete the user input. Then we loop trough the result of our previous select and check the authorization. If the check succeed we add the plant in the selection criteria. The flag is only to issue a small message that the input has been restricted to fulfill the authorization.

23-11-2015 16-03-10.jpg

Additional hint. It also a good idea to check at end of the loop at least on auth check succees because no authorization will result in an empty selection criteria and empty selection criteria mean select everything.

 

23-11-2015 16-09-23.jpg

Here we go. Once this is done all queries build up on this query will restrict the result based on the authorization of the user.

 

Complete coding attached. .xml is to open in Word .txt is plain text.

 

Credit

Credit goes to Jaideep Sharma from this thread Authorization check in SAP Queries.

Generate custom MT103 file format for electronic vendor payments

$
0
0

Introduction-

Our client was exporting vendor payments via txt file from sap, but now they wanted to change the file format from txt to SIF format. So that they can export

data in SIF format from sap and do the vendor payments  ahead. So we have created new file format ZMT103 which was copy of MT103  And extended to further modifications as per the requirement.  

 

Steps to create the new file format ZMT103

1. In order to change the file format for vendor payment from txt to MT103,Copy the existing file format from MT103 to ZMT103 in tcode ‘OBPM1’ as shown below

1.png

2. Create 2 function modules in SE37.

    Copy FM ‘ZFI_PAYMEDIUM_MT103_20’ from FI_PAYMEDIUM_MT103_20

    In this FM, Modify header section of the file as per the requirement.

    then Copy FM ZFI_PAYMEDIUM_MT103_30 from FI_PAYMEDIUM_MT103_30

    In this FM, Modify main section in file as per the requirement.

 

3.Go to Tcode -> OBPM3 -> assign Fm ZFI_PAYMEDIUM_MT103_20 to Event ‘21’

   And FM ZFI_PAYMEDIUM_MT103_30 to Event ‘31’ as shown below.

2.png

3.png

 

4.Goto Tcode OBPM4 and create variant as shown below. Variant will not be transported, it should be created in each system

4.png

5.png

 

5.Now go to FBZP-> Payments in Country-> select country and specific method -> and assign format ‘ZMT103’ in the option ‘use payment medium

   workbench’ as shown below.

6.png

 

6.At last execute the payment run in F110 and get the file generated at the path mentioned in the variant /PBMG/legacy/ZEU6004_ZMT103.txt as shown

   below in the ZMT103 format.


12.png


ABAP Channels Demos in AS ABAP 7.5 Developer Edition

$
0
0

This guide explains step-by-step how to execute the ABAP Channels demos, contained in the AS ABAP 7.5 Developer Edition incl. links to the relevant SCN blogs and videos.

View this Document

Getting Started with SAP NetWeaver 7.50 SP1 AS ABAP and SAP BW on SAP HANA - Developer Edition

$
0
0

The Developer Edition AS ABAP 7.50 SP1 on HANA features new and classic demo scenarios: Fiori Reference Application, ABAP on HANA Feature Gallery, BW/BI/BCP developer scenarios, BOPF samples, ABAP Channels, WebDynpro and FPM,and ABAP Code Checks for S/4 HANA simplifications.

View this Document

Validate data in Table Maintenance Generator event

$
0
0

The TMG event 01: Before Save., can be used instead of going for event 05: New Entry if you have validation process to do.


The problem with event 05 is that, control goes into the include/form only on the newly created entries. So, if you have you had to change any existing data, the control will not pass through the validation code !!


Here is a piece of code that you can use for your development purpose.


Here,

  • <action> is a flag that will have values as 'N' if a new entry is made or as 'U' if existing entry is modified.
  • <vim_total_struc>is a structure that holds the current looped value on TOTAL table.
  • it_total_zdata, internal table should be of type table z-table.


LOOP AT total.

  IF <action> EQ 'N' OR <action> EQ 'U'.

    APPEND <vim_total_struc> TO it_total_zdata.

  ENDIF.

ENDLOOP.


IF it_total_zdata[] IS NOT INITIAL.

* Perform validation

    LOOP AT it_total_zdata.

      IF it_total_zdata-name NE 'TESTNAME'.

        MESSAGE 'Name is not TESTNAME' TYPE 'S' DISPLAY LIKE 'E'.

        vim_abort_saving = c_abrt_save.

        sy-subrc = 4.

        EXIT.

      ENDIF.

    ENDLOOP.

ENDIF.


IMPORTANT POINTS  !!

  • Message should be of type 'S'. If not, the screen returns to SM30, which looks bad !! Make sure its displayed either as 'Error' or 'Warning'.
  • vim_abort_saving has to be set to 'X' to avoid data being saved. (Since the message popped is of type 'S', control proceeds further!!)
  • Set sy-subrc as '4' which stops further processing.


The above points are mandatory, if you want a message to be popped and wrong data still to be seen giving an opportunity to the user to rectify.

ABAP Quick Search for NWBC

$
0
0

In the SAP (Netweaver) Business Client you have a search bar in the upper range of the window. As soon as you type something in there, it tries to get search suggestions from all the defined so-calledsearch providers:

Context.png

It is possible to add own search providers. For more information, see: WKS: How to use NWBC in TM - Search Providers

 

The ABAP Quick Search for NWBC is such a search provider.

With that search you can easily search for all ABAP related content available on your system and open it with one click:

Example.png

 

Additional Features:

  • Results are sorted by type
  • Define a namespace and search it by typing "//"
  • Extra fancy result page

resultpage.PNG

  • Search for special result types by typing "\<object_type>" (see the list at the end of the posting or just type "\" and look at the type suggestions)
  • Decide how to open tables: Do you want to see the structure (SE11) or the content (SE16)?

Tables.png

  • Decide how to open BOBF Business Objects: In the BOBF Test UI or in BOBF Conf UI?

OpenBOBF.png

Unfortunately, not all functions work in NWBC 4.

 

 

If you want to have the search included into your Business Client, please follow the steps in this scn posting: How to include ABAP Quick Search into NWBC

 

Here is the standard list of result types for which is searched for. In case you want to search for a certain type, add \<object_type> to your search request.

E.g. "\CLAS" for classes.

 

ACIDCheckpoint Group
IWPRGW Service Builder Project
SAMCABAP Messaging Channel
SAPCABAP Push Channel
SPRXGeneric Proxy
BOBFBOPF Business Object
BOBXBOPF Enhancement Object
CLASClass
COBOBudiness Object
DEVCPackage
DOMAMain
DTELData Element
ENQULock Objects
FUGRFunction Group
FUGSFunction Groups
IAMLLanguage Dependent MIME Object
IAMUMIME Objects
IASPInternet Service
INTFinterface
MSAGMessage Classes
PARAUser Parameter
PINFPackage Interface
PROGInclude
RPDFReport Definition
SCATTest Case
SCGRService Group
SFBFBusiness Function
SFPFForm
SFPIInterface
SHLPSearch Help
SHMAShared Object Area Class
SMIMMime Objects
TABLDictionary
TRANTransactions
TTYPDictionary
TYPEDictionary
VIEWView
WDCAWeb Dynpro Application Configuration
WDCCWeb Dynpro Component Configuration
WDCPWeb Dynpro Chip
WDYAWeb Dynpro Application
WDYNWeb Dynpro Comp/INTF

Guides and Tutorials for the Developer Edition of AS ABAP incl. BW on SAP HANA

$
0
0

The Developer Edition of AS ABAP incl. BW on SAP HANA comes with pre-configured users and pre-installed sample applications. Thus, you can immediately start developing or trying out new capabilities and code samples. Please find below a list of guides and tutorials which are already implemented in or are applicable for this developer edition.

 

Remark: Some of these guides and tutorials can only be used on SAP HANA, others also apply to AnyDB systems, e.g. the AS ABAP on MaxDB trial. Thus, all guides and tutorials are labeled accordingly*.

 

SAP HANA Developer Guide [SAP HANA*]

This guide explains how to build applications using SAP HANA, including how to model data, how to write procedures, and how to build application logic in SAP HANA Extended Application Services (SAP HANA XS).

 

SHINE: SAP HANA Interactive Education [SAP HANA*]

SAP HANA Interactive Education, or SHINE, is a demo application that makes it easy to learn how to build

native SAP HANA applications. The demo application comes with sample data and design-time developer objects for the application's database tables, data views, stored procedures, OData, and user interface.

 

ABAP for SAP HANA Reference Scenario [SAP HANA*]

The ABAP for SAP HANA reference scenario offers guides and tutorials including a pre-installed sample application which guide you through the E2E development process and provide sample coding leveraging the code-pushdown paradigm on SAP’s in-memory database. For more information please visit the reference scenario home page or directly consult the corresponding how-to guide.


How to build Fiori Applications

This blog introduces the SAP Fiori Reference Applications.These applications demonstrate the development and UX Design guidelines and best practices applicable to the SAP Fiori development lifecycle. This covers the entire end-to-end process from design and technology to coding principles, from OData modeling to implementation, as well as selected product standards such as performance, and extensibility. The SAP Fiori Reference Apps are based on the Enterprise Procurement Model (EPM).

 

Developing a Java extension on SAP HANA Cloud Platform using JCo/RFC [AnyDB*]

In this tutorial you will develop a Java extension on SAP HANA Cloud Platform using a JCo/RFC connection to your ABAP system in the cloud or on-premise. The scenario used in this tutorial is based on the well-known SFLIGHT model.

 

Business Warehouse Scenarios [SAP HANA*]

The developer edition includes SAP Business Warehouse 7.4 which provides pre-activated sample scenarios for selected OLAP functions and integrated planning. Moreover, it contains predefined objects, such as InfoProviders, Queries and Workbooks. For more information please refer to this page or use transaction RSFC directly in the system.

 

How to implement an OData service with SAP NetWeaver Gateway [AnyDB*]

This how-to guide by Andre Fischer describes how to quickly create an OData service with SAP NetWeaver Gateway. You will learn how to create a data model based on a DDIC structure and implement the corresponding services using the OData channel programming model. For more information please download the how-to guide from SCN.

 

How to build SAPUI5/HTML5 applications consuming OData services [AnyDB*]

This blog by Bertram Ganz describes the end-to-end process required to develop a SAPUI5/HTML5 application user interface (with table, popup and ux3 shell) consuming a local OData service by SAP NetWeaver Gateway. The created OData service is based on the SAP NetWeaver Enterprise Sales and Procurement Model as a pre-installed demo/proxy application that provides a list of products as business data. For detailed instructions please download the how-to guide from SCN.

 

Real-time eventing using ABAP Channels

Using ABAP Push Channel– Web Socket implementation for ABAP – you can push in real-time any ABAP backend data changes to your Web UI and vice versa. With ABAP Messaging Channels your ABAP application can get notified about the processing status of other ABAP sessions and react without having to poll the database periodically for an updated status. And last but not least using both ABAP Push and ABAP Messaging Channels you can implement real-time collaboration. This blog introduces ABAP Channels and offers links to more blogs and video tutorials. Learn how to execute step-by-stepABAP Channels Demos in AS ABAP 7.5 Developer Edition.

Viewing all 935 articles
Browse latest View live