cancel
Showing results for 
Search instead for 
Did you mean: 

IMPORT REPORTS - CREATE .key File.

jgangwolf
Participant
0 Kudos
334

Hello,

i am trying to import some SDBs into the EHS Substance Database. Normally the corresponding key file is created during the export. But in my situation there is no key file. So i have to create them by myself. The function module CVE9_RDO_DOKX_KEYFILE_CREATE is not very helpfully also the documentation. Are the another possibilites to create such key files?

Thanks in advance.

Jonas

Accepted Solutions (1)

Accepted Solutions (1)

christoph_bergemann
Active Contributor

Dear Jonas

if you look "deeper" in the function module_and anything around you should be able to understand the "parameter" as part of the key file.

More important is to understand. which part of the key file is "critical" and which not. In any case. KEY files are generated normally if needed manually.

Topic has been discussed here. Example: How to generate or get key file for released re... | SCN

EHS - CG36 - Import report - how to define MSDS... | SCN

[Solved] EH&S - .key file creation - interface

These are only example. You will find clearly more if you look deeper

C.B.

jgangwolf
Participant
0 Kudos

Hello Christoph,

thanks for the information. I worked them through but after debugging the function modul i saw that the problem was not the modul itself. It dumps because of the file path which i typed in as the location for the key file. On a linux based system it works but on the windows based system following error occurs. Dataname ..... is not valid. Valid dataname is '\\PNTD01\sap\SH1\SYS\global\'. I have the same path syntax but it does not work.

J.G.

christoph_bergemann
Active Contributor
0 Kudos

Dear Jonas

pay attention ! Windows and Linux OS system can rise "issues" in load. We have one "ASCII" based file and one (in most cases) pdf file. For ASCII file: you need to understand how OS windows and Linux is working. (the topic of upload as "BIN" and "ASC" file has been discussed often here as well)

In any case: path name is wrong. You have one "\" to much at the beginning (for Windows OS)

Generally: this is a "normal" error. For linux i belive the story is "/pntd01/" etc. and for windows it is "\pntd01\" etc. (FOR LINUX: Case sensitive if i remember correct)

On top: the "end of line" is different (for key file this is important !). On windows it is asc 13 + asc 10 and on linux it is asc 10 only ; this is an important difference.

The topic of report import via key file is discussed "often" (and difference in windows and linux OS the same)

There is one INCLUDE in SAp which "explains" the parameter of the "key file; just check as well SAP original function module for the upload process. PAY ATTENTION: Most consultant "ignore" that you can exchange the function module used by SAP with custom one. Here you can (if needed) simplify the key file content. PAY ATTENTION: you need to add further customizing to be sucessful in upload (VERY IMPOTANT STEP !) This step is mandatory ! The issue is: this customzing is not docuemnted "well" by SAP. I assume you know the steps here

C.B.

PS: the SAP framework is designed quite well; for upload you can use at many places here other function modules and you can switch by proper "simple" customizing from SAP original to custom one

jgangwolf
Participant
0 Kudos

Hello Christoph,

thanks for your effort. I took the OS specific characteristics into consideration. For the testing i uploaded the key file as asc and the pdf as bin. The pathname '\\PNTD01\sap\SH1\SYS\global\ is recommended from SAP. My pathname is

D:\usr\sap\...\SDBtrans\

J.G.

christoph_bergemann
Active Contributor
0 Kudos

Dear Jonas

in context: '"\\PNTD01\sap\SH1\SYS\global\ is recommended from SAP". This is a "wrong" pathname (not usable for windows OS in my opinion); and the message is "misleading". SAP can not recommend here something; you define the folder structure; SAP can guide (and may be establish Best Practise folder structure); but if set up is done correct; any folder structure can be used

but::

D:\usr\sap\...\SDBtrans\

looks "correct" (if you "exchange the "..." by someting (i have only experience with unix/linux like OS).

Do you have read/write acess to this folder ? This is important !

First step is always: move the file (two files) from e.g. client to OS of SAP system, (e.g. to the folder D:\usr\sap\...\SDBtrans\) using SAP EHS standard transactions

Second step is: executing the "preimport" check. Here I assume you get the error

can you check e.g. Al11 (transaction to displays files in folder structure of OS? Can you "see" your uploaded files there?

PS: For the testing i uploaded the key file as asc and the pdf as bin. => correct use of process

C.B.

PS: onyl as example other threads:

PPS:

jgangwolf
Participant
0 Kudos

Hello Christoph,

because of the filepath problem i created a keyfile manually. With cg3z i uploaded the test file and the keyfile into the specific path. Test with al11, works fine. This would mean to me that i have all permission. So the next module is the preimport. There i filled all parameters and debugged it. The return tables inlude information about the process. No error. So the next module i want to test is the import. Now i get one error which i also cannot reproduce.

christoph_bergemann
Active Contributor
0 Kudos

Dear Jonas

mhh. The error message might indicate that you use some customer function module (e.g. because of leading"ZJG_ etc.)

Luckily: in scn (or using google) you can really find lot of help. May be take a look here:

Download and upload of file to server dir (AL11) | SCN

and here

Download a binary file from application server to front-end | ABAP Code & Experiments

not "100%" what you may be need to check but...

(same as: upload photo using file upload | SCN

how to conver a BINARY Table in specific format... | SCN

The error message indicate that the SAP system is finding a situation there no soltuion exists any more (but not a short dump).

Quite interesting is this:

relatign to this OSS: 1809258 - Internal program error; ( <program name> SAPLC13Z 0 C13Z_RAWDATA_READ )

Bit I would that you are using the right release.

So may be "debug"

C.B.

PS: I assume on top that you have prepared any other customizing (e.g. document  type IBD etc. etc.)

PPS: check db:: 4.43::Superscript printout error in MSDS pd

and discussion there as:

DB:2.48:Error In Importing Msds And Key Files Using C13g_Dokx_Sdb_Import cd

jgangwolf
Participant
0 Kudos

Hello Christoph,

thank very much for your support. I nearly solved the filepath problem. The Validation between logical and physical filepath does not work proper. If you dont maintain in t-code "file" the assignment of logical and physical path expressions the system takes always the standard path. In my case the assigned physical path was an automatic filled path which does not exist.

Now the problem is only when i type in the target file name then the key file will be created.

For the purpose to write 100 key files dynamically this will not work.

J.G.

christoph_bergemann
Active Contributor
0 Kudos

Dear Jonas

well done. As mentioned: you can exchange the default FM. You can reduce than content of key file. But key file generation is "MANUALLY" (but you can look for EXCEL macro; based on some input EXCEL can generate the key files in "mass" (but teh most work is to enter the data; and not the macro topic)

C.B.

jgangwolf
Participant
0 Kudos

Hello Christoph,

to close this Thread here is the solution:

Answers (0)