Blog Archive

Thursday, September 25, 2014

Nested IF , Lookup option in excel sheet and Lookup functionality achieving in java code in SAP PI.


public void getNameById(String[] a, String[] b, String[] c,
 ResultList result, Container container){

Map map = (Map) container.getParameter("names");
if (map == null){
 map = new HashMap();
 for (int i = 0; i // if the payload is valid to xsd, b and c have equal length
 map.put(b[i], c[i]);
 container.setParameter("names", map);



public void getPhonesById(String[] a, String[] b, String[] c, ResultList result, Container container){

Map map = (Map) container.getParameter("phones");
if (map == null){
 map = new HashMap();
 for (int i = 0; i
 List list = (List) map.get(b[i]);
 if (list == null){
 list = new ArrayList();
 map.put(b[i], list);
 container.setParameter("phones", map);

List list = (List)map.get(a[0]);
for (int i = 0; i< list.size(); i++) result.addValue((String) list.get(i));


Using IF condition in excel sheet and Lookup function use( alternative for nested if condition)

Wednesday, September 24, 2014

Debuggin java UDF with NWDS


Friday, September 19, 2014

Minimize number of Sync call to external system in message mapping for performance issues.


  • Minimize the number calls to external system frequently in message mapping.( for performance issues).
  • RFC lookup use single call ->get all results in single query and use tables as return paramters./ use delimiter for values separation and internally use those results to target. may be similar to rfc_read_table
  • Similarly do the same with SOAP and JDBC call.

      similarly for huge values lookup:

Other some important links

ABAP transports co-file and data file STMS CG3Y CG3Z AL11


ABAP transports(manual) and PI transports in manual(transports)

1.Transport request in SE10(Creating new, include objects from other, add individually...)
Transport request has 2 files internally(there are actually files, we move from one system to another)
2.Cofile file , Starts with K<0000>.
3.Data file: Starts with R.

Check data and cofile files using AL11

Placing Co-files and Data files
Server->Local system and Local to server using 4.CG3Y and 5.CG3Z or using file network mapping if you have more number of transports.

6.Importing Transport request in another server with 6.STMS(i.e. after placing cofile and data file specific that transport).

Before proceed for abap transports. first check for syntax and slin check as follows
1.Extended syntax check

----------for PI manual transports in product development--------

SLD: export sld objects as cim file( go to products and export required software components)
For technical system(TS and BS): better to create manually.
To import cim file, go to another PI sld, administration, choose import option.

ESR: export and import entire software components, if required individually also(there are tpz files)
For configuration: create manually it is better.

Update on : 15th Oct 2014

1) No need to create new transport and not required to included old transport number.
   i.e. avoiding new transport
2) avoid additional activity.

Thursday, September 18, 2014

easy learn ABAP by debugging options


Once you are family with debugging, you can easily handing abap work. can easily identify the bug (in test data)

ABAP debugging.

a) session debugging b) external debugging

c) certain programs are not catch able for debug, for that use, /h then again  use (enable) system debugging and update dubbing on.( before that add break points in the required program).

d)for idoc and nast related, first save the output,
then debug the RSNAST00 program then you can put break points, what ever you have maintain form report ( might be perform in NACE settings, output types). where we need to set output as "not start immediately".

after running and save transaction, program will go in save mode, then we can run the report in se30 i.e. RSNAST00 , before that, put break points in program.

e) debugging, RFC remotely/ externally, 
see my another blog, how to debug RFC calls.
1)first identify the user we are using to call RFC remotely,
2)for that user, enable the external break point.

f) some times, break points, may not work, that time, use the statement in abap code,
like "break-point." in the ABAP programming.

Like this we can debug applications and ABAP code.
Hope this might be useful,  by knowing this, you can save time in your work, might be hours or days also.   add your comment if it is useful.

ABAP select statements: Should know for every abap'ers


Way of using select statement in abap to get the results from table.

1) selecting all fields of  a SAP table into internal table
2) selecting specific fields in internal table
3)selecting specific fields in internal table where fields are in specific order
4)select  end select statement
5)select for all entries( alternative for joins)

Tumb rule should: using select statements in abap

1. one query, one select in internal table and do different operations,
Internal table, loop, read table, if, clear,refresh,free,
Internal table: insert/append,modify,delete
if is initial.
if not itab[] is initial.
if range

abap internal table operations

regular expressions and some sample code

abap editor in notepad++

abap report sections: in different views

Delete adjacent tables( duplicate entries in internal table after sorting)

abap Tips good links

How to check whether purchase order is new or updated one in SAP from external system


Requirement: We are getting ORDER05 idoc for both create and update in SAP PI.
(Same message type, i.e. not using ORDCHG, in both cases using the same, because target system expects all records)

Key: How to check whether purchase order is new or updated one in SAP

We would like to know, order status, based on purchase order number

Again calling SAP ECC system using RFC call(syncronous call) by passing the purchase order number and want to get the status of the Order number

Case:1) By using NAST table ( AENDE indicator)

Case 2: by using CDPOS or CDHDR tables.

Now I changed the existing PO in me22n, only quantity, i have observed following enteries are added in the cdpos and cdhdr table.

new entries are added in the cdpos table( selected area)

 New entries are added in the cdhdr table (selected area).

abap select query

*select count(*) into l_count from cdhdr WHERE objectclas = 'EINKBELEG' and objectid = PONUMBER and change_ind = 'U'.

select count(*) into l_count from nast WHERE kappl = 'EF' and objky = PONUMBER and aende = 'X'.

if l_count eq 0.
   *  write statements for new po
   * write statements for change po.

Sunday, September 14, 2014

Do not be like a Developer for more than 8 -10 years, Because requirements in market for below these people only


Dear friends, After couple of years in IT industry, I have observed and sharing my opinion with you.

Most of the openings for below 10 years experienced candidates only, After that Industries are not focusing on this profile.

1.It is difficult to manage that profile as similar to less experienced persons.( ex: assigning more work, ask them to work more time, train others etc.)
2. These profiles may not be quick learns, ( leaning new things quickly and use those)
3. Packages are more, industries are trying to be optimistic with pays
4. Difficult to outsource family persons and additional charges.

Suggestions after 10 years
1. alternative roles in project like lead/ architect or Management side
2. Fix with one stable company and stable location.
3. (or) get some alternative earnings, while doing same job.

Note: Please give your comments if you have any, your suggestion might be useful for next generation people.