Quantcast
Channel: SCN : All Content - SAP NetWeaver Technology Platform
Viewing all 1967 articles
Browse latest View live

How to speed up client deletions

$
0
0

When deleting large clients, long runtimes are often a problem. Parallelism can help, but the real bottleneck are large tables. So maybe this guide can help. The SQL statements are for Oracle databases with SAPSR3 layout, for other databases or layouts you have to modify them.

 

Manual deletion of tables

First of all, you need to identify large, client specific tables. E. g. in IS-U systems candidates are DFKKOP or SWWCNTP0. These tables are client
specific, so you can easily find out if the table can be truncated without harming the other clients:

 

 

SELECT mandt, count( * ) FROM sapsr3.dfkkop GROUP BY mandt;  

or

 

SELECT client, count( * ) FROM sapsr3.swwcntp0 GROUP BY mandt;  

As result, you see the number of rows for each client. When only the client you want to delete has rows, you can truncate the tables beforehand. This will significantly speed up the client deletion.

Copy & deletion of "unbalanced" tables

When you identify tables, where only a few rows are contained in the clients which will remain in the system and a huge amount of rows in the client
you want to delete, you can first copy all remaining rows in a new table (assuming you want to delete client 100):

 

CREATE TABLE sapsr3."dfkkop_tmp" TABLESPACE psapsr3 NOLOGGING PARALLEL 8 AS
SELECT /*+ INDEX("dfkkop" "dfkkop~0") */ * FROM sapsr3."dfkkop" WHERE mandt NOT IN ('100'):  

After that, you just have to truncate the original table and insert all rows from the temp table:

 

TRUNCATE TABLE sapsr3."dfkkop";
INSERT INTO sapsr3."dfkkop" SELECT * FROM "dfkkop_tmp"; 
COMMIT;  
ALTER INDEX sapsr3."dfkkop~0" REBUILD ONLINE;  

Rebuilding the primary index is a good thing to speed up the client deletion afterwards.

Automation of finding tables / preparing statements

If  there are many huge tables and the time windows is very small, you may use a scripting language to prepare the SQL statements. I prefer Perl,
as I know this language and as Oracle comes with Perl and the DBI module. Connecting to your database is pretty simple:

 

use DBI;
my $sid = "<SID>";
my $hostname = "localhost";
my $port = "<listener port>";
my $sappw = "<password>";
my $sapuser = "SAPSR3";
my $connection = DBI->connect("DBI:Oracle:SID=$sid;host=$hostname;port=$port","$sapuser/$sappw")
|| die "Can't connect to $sid: $!";

You can start the script with $ORACLE_HOME/perl/bin/perl script.pl as oracle owner. Next step will be to determine all client specific tables - in most cases,
the first column is named client, mandt or mandant. Here is a code snippet which will give you number of rows in the remaining clients and overall rows, you just have to adjust to your needs:

 

my $mandt_exclude = '100';
my $sql_all_tables = "SELECT object_name FROM dba_objects
WHERE owner = 'SAPSR3' AND object_type = 'TABLE' ORDER BY object_name ASC";
my $all_cursor = $connection->prepare($sql_all_tables);
$all_cursor->execute();
while (my @table = $all_cursor->fetchrow_array) {
$sql_first_column = "SELECT table_name, column_name FROM dba_cons_columns
WHERE table_name = '$table[0]'
AND constraint_name = ( SELECT MIN( constraint_name ) FROM dba_cons_columns
WHERE table_name = '$table[0]' )";
my $first_col_cursor = $connection->prepare($sql_first_column);
$first_col_cursor->execute();
while (my @col = $first_col_cursor->fetchrow_array) {
if ($col[1] eq "CLIENT" or $col[1] eq "MANDANT" or $col[1] eq "MANDT") {  $sql_count_all = "SELECT count( * ) FROM \"$table[0]\"";  my $count_all_cursor = $connection->prepare($sql_count_all);  $count_all_cursor->execute();  while (my @exc = $count_all_cursor->fetchrow_array) {<Put your custom logic here>  }  $sql_count_exclude_mandt = "SELECT count( * ) FROM \"$table[0]\"
WHERE $col[1] NOT IN ($mandt_exclude)";  my $count_exclude_cursor = $connection->prepare($sql_count_exclude_mandt);  $count_exclude_cursor->execute();  while (my @exc = $count_exclude_cursor->fetchrow_array) {<Put your custom logic here>
}
}

You just have to add some output to build the SQL scripts.


Executing server-side processes

$
0
0

Be aware that you should only do things which won't harm system!

Maybe you know the problem - you have to execute something at OS level and don't have access. Basis team isn't accessible and it's urgent...

With a few tricks, you can help yourself.

Example 1: Manual import of transport requests

Starting situation: You have to import a transport request and don't have proper rights in target system, but are allowed to call transaction SM69.

First, you need to find out where the transport profile is located - usually in /usr/sap/trans/bin. AL11 or RZ10 might help.

Next step is to check if there is a command in SM69 defined, if not, create one:

SM69_1.jpg

SM69_2.jpg

After that, you may run it. First add your transport to buffer:

SM69_3jpg.jpg

The syntax is (write in field Additional parameters):


tp pf=<transport profile> addtobuffer <transport request> <SID> client=<target client>

After that, you can import it:

 

SM69_4.jpg

Just change "addtobuffer" to "import" - you may even add unconditional modes with the U flag, refer to tp Options - Software Logistics - SAP Library

Example 2: Exporting table contents

Starting situation: You need to export complete table contents with R3trans in order to import everything in a target system. First of all, you need to define your export file. Create a new file with thetext editor of your choice (mind to use proper line ending):

export
file = '/tmp/export.txt'
delete from <table>
select * from <table>

The delete statement is not executed when you export the table, only at import. Uploading this file can be done with transaction CG3Z:

 

r3trans_1.jpg

After upload, just call R3trans using SM69 with these parameters:

R3trans -w /tmp/output.txt /tmp/export/controlfile.txt

When the export is done, you can use CG3Y to download the file. Upload it and import it in the target system with:

R3trans -w /tmp/output2.txt -i /tmp/export.txt

Easing the pain in TMS - using transport of copies

$
0
0

Maybe you know the problem - QA queue is full of old requests, nobody knows which one is relevant (sometimes the programmer isn't even working for your company any more). The answer is transport of copies! This way, you can test your programs in qa system without filling the qa queue with requests - when your program is working, you release the original request and import it in production.

Educating programmers is the next step. But how about automation? SAP delivers BAdI CTS_REQUEST_CHECK with method CHECK_BEFORE_RELEASE - just implement it and you can do various checks before releasing requests. First you have to check the transport type - just use a case condition:

CASE type.       WHEN 'K' OR 'W'.

This way, only workbench and customizing requests are taken in account - the BAdI ignores everything else including tasks.

Creating transport of copies

First, you need a popup to decide whether changes are final:

 

CALL FUNCTION 'POPUP_TO_CONFIRM'            EXPORTING              titlebar       = 'Final?'              text_question  = 'Are your developments final?'              text_button_1  = 'Final'(001)              text_button_2  = 'ToC'(002)            IMPORTING              answer         = lv_answer            EXCEPTIONS              text_not_found = 1              OTHERS         = 2.

To create a new request, you can use FM TR_INSERT_REQUEST_WITH_TASKS:


CALL FUNCTION 'TR_INSERT_REQUEST_WITH_TASKS'                EXPORTING                  iv_type           = 'T'                  iv_text           = lv_new_text                  iv_owner          = owner                  iv_target         = tarsystem                IMPORTING                  es_request_header = lv_request_header                  et_task_headers   = lv_task_headers                EXCEPTIONS                  insert_failed     = 1                  enqueue_failed    = 2                  OTHERS            = 3.

T stands for transport of copies, I create a new description with "[TvK]<old text>" to see which transport was created by BAdI. owner andtarsystem is taken from original request. Next step is to copy all objects:


CALL FUNCTION 'TR_COPY_COMM'                  EXPORTING                    wi_dialog                = abap_false                    wi_trkorr_from           = request                    wi_trkorr_to             = lv_request_header-trkorr                    wi_without_documentation = abap_false                  EXCEPTIONS                    db_access_error          = 1                    trkorr_from_not_exist    = 2                    trkorr_to_is_repair      = 3                    trkorr_to_locked         = 4                    trkorr_to_not_exist      = 5                    trkorr_to_released       = 6                    user_not_owner           = 7                    no_authorization         = 8                    wrong_client             = 9                    wrong_category           = 10                    object_not_patchable     = 11                    OTHERS                   = 12.

TR_COPY_COMM copies all objects in background.


Releasing and importing the created transport


Next step is to release your request, ignoring object locks:


CALL FUNCTION 'TRINT_RELEASE_REQUEST'                    EXPORTING                      iv_trkorr                   = lv_request_header-trkorr                      iv_dialog                   = ' '                      iv_without_locking          = 'X'                    IMPORTING                      es_request                  = lv_request                      et_deleted_tasks            = lt_deleted_tasks                       et_messages                 = lt_messages                    EXCEPTIONS                      cts_initialization_failure  = 1                      enqueue_failed              = 2                      no_authorization            = 3                      invalid_request             = 4                      request_already_released    = 5                      repeat_too_early            = 6                      object_lock_error           = 7                      object_check_error          = 8                      docu_missing                = 9                      db_access_error             = 10                      action_aborted_by_user      = 11                      export_failed               = 12                      execute_objects_check       = 13                      release_in_bg_mode          = 14                      release_in_bg_mode_w_objchk = 15                      error_in_export_methods     = 16                      object_lang_error           = 17                      OTHERS                      = 18.

Other standard FMs don't ignore object locks, so you need TRINT_RELEASE_REQUEST with the option iv_without_locking. Since adding to the target buffer can take some time, I advise to do a loop:


DO 5 TIMES.                      CALL FUNCTION 'TRINT_GET_LOG_OVERVIEW'                        EXPORTING                          iv_request                = lv_request_header-trkorr                          iv_with_transport_targets = 'X'                        IMPORTING                          et_log_overview           = lt_log_overview.                      lv_check = 0.                      LOOP AT lt_log_overview INTO wa_log_overview WHERE sysnam = '<sys>' AND rc = 'W'.                      ENDLOOP.                      IF sy-subrc = 0.                        lv_check = 1.                      ENDIF.                      IF lv_check = 1.                        EXIT.                      ENDIF.                      WAIT UP TO 1 SECONDS.                    ENDDO.

When everything is fine, you can import the created request:


CALL FUNCTION 'TMS_MGR_IMPORT_TR_REQUEST'                        EXPORTING                          iv_system                  = '<target SYSID>'                          iv_request                 = lv_request_header-trkorr                          iv_ignore_cvers            = 'X'                          iv_monitor                 = ' '                          iv_verbose                 = ' '                        IMPORTING                          ev_tp_ret_code             = lv_trretcode                          es_exception               = wa_exception                        EXCEPTIONS                          read_config_failed         = 1                          table_of_requests_is_empty = 2                          OTHERS                     = 3.

transfer or export sap table data

$
0
0

Hi,

 

i want to transfer some SAP table data for e.g Material management related data to another database.

is there any way to accomplish this task or exporting data to file?

 

 

Thanks,

Arati

Creating node $(DIR_TRANS) with type DIRECTORY failed

$
0
0

Hi,

 

  I am getting below error

 


ERROR      2009-12-16 20:09:27.312            CJSlibModule::writeError_impl() 
CJS-30129  Creating node $(DIR_TRANS) with type DIRECTORY failed. Original exception text was: syslib.filesystem.nodeCreationFailed:
Unable to create node \\devsys\sapmnt\ with type DIRECTORY: can't create parent node...

ERROR      2009-12-16 20:09:27.359 [sixxcstepexecute.cpp:951]
FCO-00011  The step createSystemDirectories with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_System|ind|ind|ind|ind|6|0|createSystemDirectories was executed with status ERROR ( Last error reported by the step :Creating node $(DIR_TRANS) with type DIRECTORY failed. Original exception text was: syslib.filesystem.nodeCreationFailed:
Unable to create node \\devsys\sapmnt\ with type DIRECTORY: can't create parent node...).

INFO       2009-12-16 20:09:29.218 [sixxcstepexecute.cpp:1004]
An error occured and the user decide to stop.\n Current step "|NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_System|ind|ind|ind|ind|6|0|createSystemDirectories".

 

went throw many posts no results

 

environment is

 

Win2003 SR2

Oracle 10

 

Regards,

S.Manu

How to delete PI cancelled messages (SAP EHP1 NW 7.1)

$
0
0

Hi,

 

We are doing housekeeping activity in SAP EHP1 NW 7.1, therer are numerous error messages in non-prod system (Asynchronous messages), so we have cancelled those messages via report 'RSXMB_CANCEL_MESSAGES'  but now we want to remove those messages from system (via archiving or deletion) so how to remove it from system

 

Need help on this with valuable suggestions

Cannot see/trace messages in sxi_monitor & message monitor

$
0
0

Hello All,

 

I am working on SOAP to Proxy synchronous scenario.

It is working absolutely fine in development system. Now we have transported it to production system.

In production system, while testing from SOAP-UI tool i am getting correct response.

In ECC system data is also updated correctly, but when i checked messages in sxi_monitor & RWB's message monitor i am not able to see any messages.

Also checked in communication channel, message content tab --> main document it shows 'payload content is empty'.

 

I have checked in Tcode : SXMB_ADM  -> Configuration -> Integration Engine Configuration

parameter value for TRACE_LEVEL & LOGGING are set to 1.

 

I have checked settings in NWA -> Configuration -> Infrastructure -> Java System Properties -> Services -> XPI Service: Messaging System, set property messaging.SyncMessageRemover.removeBody = true (this value is same in development system)

 

Please help me how shall i trace these messages.

 

Regards

Dinesh

SPAM giving me error

$
0
0

Hi,

I am trying to import new packages in to SPAM and I am getting this error.

How do I resolve it?

headshot.png

 

Before this I was able to do the gateway package just fine.


Getting WS internal error while executing the method’s of proxy class .

$
0
0

Dear Experts.

I'm getting WS internal error while executing the method’s of proxy class . I have consumed webservice and created active logical port(with valid login credentials) in ECC System.

But when executing proxy class method's im encountering above stated error.

 

But same is working fine SOAP UI after providing user id and password for the same.

 

Any inkling on how to resolve this issue by adding any code in WSDL file.

 

 

Capture.JPG

 

 

Thanks

KH

Find the right SAP NetWeaver guide with only 6 clicks

$
0
0

Have you recently looked for the right information for installing, upgrading, or patching your SAP NetWeaver systems? And if so, did you find it quickly?

 

Perhaps you already know our SAP NetWeaver Guide Finder on SAP Service Marketplace. It’s a very convenient tool to find the right manuals based on your operating system, database, and the task you want to perform. Yet it has the disadvantage of being accessible only for registered users.

 

Today, we went public with a new version of this guide finder on SAP Help Portal.

 

There, we offer the same selection criteria as before plus some enhanced search capabilities. We also managed to get rid of some redundancies. So now, you’ll find the relevant content even faster.

 

So here are your steps:

 

  1. Open the page– and don’t forget to bookmark it (you may close the navigation pane for better usability)
  2. Select the task you want to perform
  3. Select your SAP NetWeaver release
  4. Select your SAP NetWeaver technology (ABAP, Java, or both)
  5. Select your operating system
  6. Select your database

 

     You’re done

 

guidefinder.jpg

 

Still, the guides themselves are only available to registered users of the SAP Service Marketplace. But also this will change soon as part of the SAP 1DX initiative.

 

Please try it out and tell me how you like it. And don’t hesitate to comment on this post on issues, missing content, and wishes for enhancements.

AS ABAP virtual port configuration for Web-Services

$
0
0

Hey Gurus,

 

I am having the following situation.

  • HTTP access works perfectly fine with port 80$$
  • HTTPS access works with port 443$$

($$ = instancenumber = 00)

 

Parameters currently set:

  • icm/server_port_0 = PROT=HTTP,PORT=80$$,TIMEOUT=60,PROCTIMEOUT=60
  • icm/server_port_2 = PROT=HTTPS,PORT=443$$,TIMEOUT=60,PROCTIMEOUT=60

 

Currently I can only call a SAP WEb Service by entering the following URL:
http://<hostname>:8000/sap/...
https://<hostname>:44300/sap/...

 

Now what I want to do is to be able to call a SAP Service by entering URL:
http://<hostname>/sap/...    (http://<hostname>:80/sap/...)

https://<hostname>/sap/...   (http://<hostname>:443/sap/...)

 

As far as I understood I need to create virtual ports for the already running Services (HTTP and HTTPS)

Can I also create some virtual hostename?

 

Does anyone of you have hints on how this can be accomplished?

 

Kind Regards,

Niklas

Monitoring JMS Queue Lengths

$
0
0

Hi there,

 

I need a method of monitoring a set of JMS Queue lengths (so we can see if the message are getting consumed quick enough) running within a Netweaver 7 instance. The JMS API does define a method of queue depth monitoring without looking (and counting) at each message (using a QueueBrowser for example, here http://fixunix.com/weblogic/224918-jms-queue-length.html). There seems to be a specific method of doing this for JBoss, Tomcat etc..

 

So my question is how can I monitor a JMS Queue's depth in netweaver? and write the output to a log for example

 

thanks

sap web dispetcher redirect option

$
0
0

Dear all

 

I have SRM system and sap web dispatcher. When i try redirect external adress to internal using sap wd i face with issue "Can not display this page"

 

My actions.

 

1) Add profile parameter to SAP WD:

 

icm/HTTP/redirect_1 = PREFIX=/, FROM=123.12345.ru, FROMPROT=http, FOR=123.12345*, TO=/sap/bc/nwbc, PROT=https, HOST=123.12345.ru, PORT=port_number

 

AND i add entry to file hosts on my windows pc like this :

 

<wd_ip.addr> 123.12345.ru

 

Please tell mewhere is the mistake?

XA_Transaction Rollback issue.

$
0
0

Hi All,

 

We have scheduled a job which should run at certain number of times in a year. The job should run and delete the CE table content (We are using Composite Application Framework (CAF), and Business Objects (BOs)).That is, here the data is deleted from CAF table.

 

Problem is, scheduled job will run at given time and it works fine as we could see it in logs it is deleting each line of the table, but when the job is completed, the transaction will rollback and result in no deleteion. when we check in logs, we are getting following error,

 

Capture.JPG

  • Cannot end XA transaction: XID:<XID> in state ROLLBACK_ONLY
  • XAException occured during <CLIENT SESSION>Returned status is XAER_PROTO

 

We are using JEE for coding. When we checked this with Basis team, it looks like a Time out problem. As job is taking nearly 3 and half to complete when actually it should comlete within 45min. So we have thought may be this is because of more data in the table.

 

can anybody give a solution for this? or can anybody tell if there is any way by which we can COMMIT in code after every line instead of waiting for all the lines to get delete and then COMMIT.

 

Thanks in Advance.

How To add HCM Data in SAP IDES

$
0
0

Hi people!!

 

 

 

I've already installed SAP IDES ERP 6.0 EHP 7, Support Release 2 on Windows Server 2008 R2 Standard, I installed it because I need training with HCM in a environment separate, but, when I try to use HCM data,It does not exist in this IDES, this IDES only has sales, production, FI, and logistics client.

 

What can I do to have HCM data, that allow me use the System training based on IDES data (data like employees, infotypes, etc... I mean Master Data)

 

 

reinstall SAP IDES With HCM Data? -- Where I can find information?

Import a client with HCM Data? -- How?

 

 

Please Help me!!

 

 

thanks

 

Fabricio!


Missing authorization for SYST or RFCPING

$
0
0

Hi,

 

We're trying to create a transport route between two of our ECC systems to move functional modules from one system to the other. However we get an error and we've found a SAP note to resolve this issue, however I don't understand how to implement this SAP note.

 

Could someone please help me with a step by step guide to implementing note 1108662,

 

Add the function group SYST to the RFC authorization. Add the function group "SYST" to the default role SAP_BC_WEBSERVICE_SERVICE_USER in the authorizations for "Cross-application Authorization Objects" in the area "Authorization Check for RFC Access" and the object "Name of RFC object to be protected" and save and activate this role. You should then execute a user comparison for this role.

 

Thank you very much for your time and help.

 

Regards

Jing Jing Tao

Dispatcher Work process hangs

$
0
0

Hello Technology Experts,

 

Last 1 month I am facing a problem in our Production Server:


Please find the details about the same:

Production instance application server's dialog work process hangs indefinitely.

Users can not do anything and for everyone it hangs.

 

Our product detail:

SAP ECC.60 EHP7 Support patch 9,

Kernel 7.42 support Patch 101.

 

Analysis and Actions:

1. I have checked all the work process log files and could not find any reason for the same.

 

2. Previously, we have seen that all the work processes were waiting for the CRM Server.

Since we are not using CRM server, we have removed this CRM connection in SM59 and SMLG.

 

3. Still we are facing the same problem of Dialog work processes are getting hung Frequently (2 to 3 times per week).

4. Once we restart the complete SAP instances, then evrything works again for couple of days and again the same situation.

5.  I have sent all the Log files, Core dump, SM51/SM66, dpmon screenshots  to SAP, but they said , they could not find any reason for Dialog work process hang situation.

6. But they have recommended to go with Enq Split as per SAP note -2119669

 

Question:

1. Can anyone please let me know whether you have faced similar situation before?

2. And if in case dialog work process waits for some server or process, why all the dialog work processes are getting hung?

3. Is there any configuration in work processes where we can say that when one of the workprocess hangs, then the other process should not wait!!

4. or set the workprocess to wait for particular time, then restart the work process automatically?

 

fyi.

we will also do the Enq Split this weekend , as suggested by SAP.

 

Please let me know in case work process trace files needs to be posted for further analysis.

Thank you.

 

--

Regards,

Eswaran

Data transport in SAP

$
0
0

Hey,

 

I hope this is the right thread to ask question about SAP systems in general.

 

I'm transfering data from a database table into an info cube.

I learned that I need to do an extraction in my data source and then start an info package and a DTP in my BW.

 

At least that's how I get my data in an info cube.

 

The part I don't get is, what does my extraction do. I read that the info package transports the data to the PSA and the DTP handles further transport in the BW. Does the extraction transport the data to my info package?

 

Sry, that's a real newbie question but I want to understand how exactly my data is transfered.

 

Thanks,

 

Dominic

SAP NetWeaver Platform 7.0 installation problem

$
0
0

When i try to install SAP NetWeaver Platform it given error given below :

APinst is getting started.

Please be patient ...

 

 

starting gui server process:

  sapinstport: 21200

  guiport    : 21212

  guistart   : true

  command    : "C:\jdk6/bin\javaw.exe" -cp "C:/DOCUME1/PRADEE1/LOCALS1/Temp/sapinst_exe.5348.1215096084\jar\instgui.jar;C:/DOCUME1/PRADEE1/LOCALS1/Temp/sapinst_exe.5348.1215096084\jar\inqmyxml.jar" -Xmx256M -Dsun.java2d.noddraw=true SDTServer config=jar:sdtserver.xml guiport=21212 sapinsthost=localhost sapinstport=21200 guistart=true

 

MessageLib: unable to open URL 'file://C:/NWSETUP/NW_JAVA_700SP14_SR3/NW05SR3_DEV_WP_1/IM_WINDOWS_I386/messages.xml'

 

guiengine: no GUI server connected; waiting for a connection on host pradeep, port 21200 to continue with the installation

 

guiengine: login in process.

guiengine: login successful.

103 keydb.unableToOpenURL file://C:\Program Files\sapinst_instdir\NW04S\LM\UNINSTALL\DEVWP\control.xml, 49

103 keydb.unableToOpenURL file://C:\Program Files\sapinst_instdir\NW04S\LM\UNINSTALL\DEVWP\control.xml, 49

Exit status of child: 1

 

I think it is unable to found messages.xml.

 

Kindly help me

 

Thanks & Regards

PRadeep Sharma

+91-9910705704

Running ERP app servers on Windows with back-end HANA database

$
0
0

I was wondering if running ERP 6.0 application servers on a Windows platform with a back-end SOH / HANA database is a supported configuration?  If so, what are the benefits and pitfalls with this configuration?

 

Thanks,

Brent

Viewing all 1967 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>