cancel
Showing results for 
Search instead for 
Did you mean: 

How to check-in a local folder in NWDI to a specific DC using shell?

Former Member
0 Kudos

Hello

We are developing a project using a framework that is available by the portal out of the box.

The developers are using SVN for version control and every time they need to deploy to the portal they send changes and we manually uploading their resources under the dist folder of a portal DC in NWDI so that we could deploy this to the portal and transport it using NWDI.

This is obviously time consuming process and I'm looking of ways to simplify / automate this and I was thinking about using the DTR shell tool.

I have already setup the shell to run from NWDS and I'm now thinking of the quickest way to achieve this, so suppose I have a local folder full of resources that I want to upload and check-in to NWDI to a specific location of a certain DC, what would be the best way to achieve this?

Accepted Solutions (1)

Accepted Solutions (1)

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Roy,

have a look at the guide about the DTR console:

http://help.sap.com/saphelp_nw73/helpdata/en/49/12b42a9ba4105ee10000000a42189d/frameset.htm

Pay attention to the command script you can use to execute set of commands located inside a text file written by you.

I hope this helps.

Best Regards,

Ervin

Former Member
0 Kudos

Hi Ervin

Interesting, I never noticed this command before.

Is there a reference to see an example of a script file such as this?

More specifically I am interested in one that:

1. Creates and activity

2. Checkout a DC

3. Uploads files from local machine using this activity

4. Checkin the avtivity

Any ideas...?

Roy

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Roy,

one example that crosses immediately my mind is when you do replication.

See how to use the script command for that scenario, then you can implement your own accordingly.

http://help.sap.com/saphelp_nw73/helpdata/en/46/5d032c1e661cbee10000000a11466f/content.htm

I hope this helps.

Regards,

Ervin

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Maybe the indentation is not too nice in the guide I just sent you, take a look at another version of this document where the indentation looks much nicer:

http://help.sap.com/saphelp_nw70/helpdata/en/46/5d032c1e661cbee10000000a11466f/frameset.htm

Former Member
0 Kudos

Hi Ervin

Do you know if it is possible to activate an activity using a command? I can't see such an option in the help...

Thanks

Roy

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Roy,

activation is possible using the CBS tool:

http://help.sap.com/saphelp_nw73/helpdata/en/49/11dd83cf292810e10000000a42189c/content.htm?frameset=...

Best Regards,

Ervin

Former Member
0 Kudos

ha thank you, but will I be able to put it in one script which contains the DTR commands?

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I am afraid you need to run two separate scripts.

Best Regards,

Ervin

Former Member
0 Kudos

OK.

I have copied the DTR console from the server as per this help page: http://help.sap.com/saphelp_nw70/helpdata/en/46/652a652a717183e10000000a114a6b/frameset.htm

But when I run it it terminates with an exception (see below)

Any ideas?

Roy

connect sapddswd.bpweb.bp.com:8037 coher0 welcome1 coher0

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\coher0>cd C:\Users\coher0\Desktop\com.sap.dtr.console

C:\Users\coher0\Desktop\com.sap.dtr.console>run.bat

C:\Users\coher0\Desktop\com.sap.dtr.console>java -Dhttp.readtimeout=0 -cp C:\Use

rs\coher0\Desktop\com.sap.dtr.console\sap.com~tc~dtr~console~all.jar;C:\Users\co

her0\Desktop\com.sap.dtr.console\sap.com~tc~dtr~cmdlineappfwk~all.jar;C:\Users\c

oher0\Desktop\com.sap.dtr.console\antlr-runtime-3.0.1.jar com.sap.dtr.console.DT

RConsoleApplication

Exception in thread "main" java.lang.RuntimeException: com.sap.dtr.cmdlinefwk.Co

mmandLineException: Validation of the examples for the command "Discard" failed.

The example "discard -col -cip /collision/dce6250e4fd911dc81e400199905d653_3_b4c

044e04fd511dccef000199905d653_b4c044d84fd511dca33b00199905d653_open_PredSucc" co

ntains a command that is not valid against its specification.

        at com.sap.dtr.console.DTRConsoleApplication.registerCommandSpecs(DTRCon

soleApplication.java:207)

        at com.sap.dtr.console.DTRConsoleApplication.initialize(DTRConsoleApplic

ation.java:156)

        at com.sap.dtr.console.DTRConsoleApplication.<init>(DTRConsoleApplicatio

n.java:137)

        at com.sap.dtr.console.DTRConsoleApplication.main(DTRConsoleApplication.

java:311)

Caused by: com.sap.dtr.cmdlinefwk.CommandLineException: Validation of the exampl

es for the command "Discard" failed.

The example "discard -col -cip /collision/dce6250e4fd911dc81e400199905d653_3_b4c

044e04fd511dccef000199905d653_b4c044d84fd511dca33b00199905d653_open_PredSucc" co

ntains a command that is not valid against its specification.

        at com.sap.dtr.cmdlinefwk.CommandLineApplication.addCommandLineSpec(Comm

andLineApplication.java:115)

        at com.sap.dtr.console.DTRConsoleApplication.registerCommandSpecs(DTRCon

soleApplication.java:204)

        ... 3 more

Caused by: com.sap.dtr.cmdlinefwk.CommandNotSupportedException: Command 'discard

' is not supported

        at com.sap.dtr.cmdlinefwk.support.parser.DefaultCommandLineParser.parse(

DefaultCommandLineParser.java:57)

        at com.sap.dtr.cmdlinefwk.CommandLineApplication.addCommandLineSpec(Comm

andLineApplication.java:107)

        ... 4 more

C:\Users\coher0\Desktop\com.sap.dtr.console>^X

Former Member
0 Kudos


And another question please: I noticed that the put command allows

to upload new content for a file. What if I have a folder with local 100 files to upload? Is it possible to do this using some sort of a loop or a different command?

Former Member
0 Kudos

Hi Ervin

Finally managed to get the DTR console running as a standalone, I started investigation what's possible and I don't see an option to navigate to a track or a workspace in order to open new activity there. Am I missing something....?

Roy

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

how did you resolve the DTR console startup problem?

I ask it because this might come in handy for other customers in future.

Regarding the put command I think you can again use the script command to execute multiple commands.

I provide you some more info on this command:

Examples

Put on versioned file

Checks out the versioned file "/ws/dir/wsp/dir/a.txt" in an activity that is
implicitly created and stored in the variable $act. Then with the put command
the content of the local file "c:/dir/a.txt" is uploaded to the working resource
of the file, which is available in the variable $wr. To make the change become
active in the workspace the activity is checked in afterwards.

checkout /ws/dir/wsp/dir/a.txt
put c:/dir/a.txt
$wr

checkin $act

Put on versioned file with checkout-in-place

Same as example 1. Automatically creates an activity in which the versioned
file "/ws/dir/wsp/dir/a.txt" is checked out. Then uploads the content of the
local file "c:/dir/a.txt" to the working resource of the file and afterwards
automatically checks in the activity that was implictly created to make the
change become active in the workspace. If the remote file does not exist it is
created.

put -cip c:/dir/a.txt /ws/dir/wsp/dir/a.txt

Upload a new folder hierarchy

Automatically creates an activity in which the versioned collection
"/ws/dir/wsp/dir" is checked out. Then uploads the local folder "c:/dir/subdir"
to the working resource of the collection and afterwards automatically checks in
the activity that was implictly created to make the change become active in the
workspace. Since no remote resource was specified the uploaded folder will
remotely be available as "/ws/dir/wsp/dir/subdir" (The remote path is created
out of the current session path "/ws/dir/wsp/dir" and the name of the uploaded
folder "subdir").

/ws/dir/wsp/dir> put -cip c:/dir/subdir

Put on non-versioned file

Uploads the content of the local file "c:/dir/a.txt" to the non-versioned
file "/ws/dir/a.txt". If the remote file does not exist it is created.

put c:/dir/a.txt /ws/dir/a.txt

Regards,
Ervin

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

first you need to connect to the dtr this way:

connect <host>:<port> <user> <password> <session>

   (session can be an arbitary name,e.g. ses1).

Then you can use ls to list the workspace, e.g.:

ses1:/>ls

Mon, 9 Jan 2012 17:05:25 GMT            .

Fri, 22 Nov 2013 16:57:52 GMT           system-tools/

Mon, 9 Jan 2012 17:05:25 GMT            ws/

Then you can use the cd to navigate, e.g.

ses1:/>cd ws

ses1:/ws>cd DEMO/sap.com_SAPNWDEMO

Use the ma command to create activity, e.g.:

ses1:/ws/DEMO/sap.com_SAPNWDEMO/>ma abc

Created activity /act/abc

Use the la command to list all activities.

Regards,

Ervin

Former Member
0 Kudos

TThanks Eric I can create an activity already the thing is that in NWDS you see the activity from the relevant track but when creating them via the console I can see them in the DTR web view but no where in NWDS. Any idea why?

also, I don't see an option to add multiple files or a completed folder to an activity. If I want to checkin a local project with 100 files other than one put per resource. Any ideas...?

Answers (0)