2015 Dec 08 6:27 PM
Hello,
My name is David and I'm a student in IT engineering school in Paris.
I have to work on a scrambling project to prevent private datas on SAP to be accessed and reused by unautorised people.
First of all, I have to develop an application (in PHP) to access all tables, datas and relations, private and foreign keys and copy them in a local database in order to scramble those datas. This done, scrambling applied, next step is to put those scrambled datas back in SAP and test if everything works fine.
So, I have a question: Is it possible to duplicate all package objects in a new 'Z'package and then populate new tables with scrambled datas using connector like SAPRFC ? Is there any transaction that would help me to recreate the package structure and objets I'm woking on ?
I'm working on SAPBC_DATAMODEL package.
Help would be highly appreciated.
Thank you in advance
David
Hello,
My name is David and I'm a student in IT engineering school in Paris.
I have to work on a scrambling project to prevent private datas on SAP to be accessed and reused by unautorised people.
First of all, I have to develop an application (in PHP) to access all tables, datas and relations, private and foreign keys and copy them in a local database in order to scramble those datas. This done, scrambling applied, next step is to put those scrambled datas back in SAP and test if everything works fine.
So, I have a question: Is it possible to duplicate all package objects in a new 'Z'package and then populate new tables with scrambled datas using connector like SAPRFC ? Is there any transaction that would help me to recreate the package structure and objets I'm woking on ?
I'm working on SAPBC_DATAMODEL package.
Help would be highly appreciated.
Thank you in advance
David
2015 Dec 08 8:44 PM
Hi 'David,
you can copy any structure or package but with different name, they must not be identc, otherwise you will get Dump.
Regards
Ebrahim
2015 Dec 09 2:26 PM
Thank you Ebrahim.
In fact, it appears that it doesn't seem possible to deeply/recursively copy a package with all its objects.
So i'm looking for a way to do it by myself, using a PHP app with SAP connector.
Is there any Module Fonction I can use to get a list of all objects from SAPBC_DATAMODEL package ?
Regards
David
2015 Dec 09 8:37 PM
Hi David,
you can use this Function module "TADIR_GET"
CALL FUNCTION 'TADIR_GET'
EXPORTING
devclass = 'SAPBC_DATAMODEL'
TABLES
iadir = lt_iadir.
If you face any problem, just let us to know,
good luck
Regards
Ebrahim
2015 Dec 10 3:04 PM
Hi Ebrahim and thanks again. 🙂
I'm facing a SAP error from my PHP app, due to security policy:
"RFC_ERROR_SYSTEM_FAILURE Status : Message : The function module "TADIR_GET" cannot be used for 'remote' calls"
I think I'll have to consider another solution : a new SAP instance with SAPBC_DATAMODEL package installed, deleting all datas and then populating database with scrambled datas.
Thank you for all.
David
2015 Dec 11 7:32 AM
Hi David,
you are right, it is not RFC-Function,
Remote enabled module , but you can copy it to z_FM_TADIR_GET , but there are many sub routine, and it is not easy to copy them., any how what could I advise you, just create a new FM as RFC and just select the data from TADIR, If you can not do it, just write us, and we will help you to write a function modulde RFC with select statments,
Function module RFC
https://www.sapnuts.com/courses/SAP-Cross-Applications/rfc-development/creating-rfc-function.html
PHP calls SAP RFC
I hope it could help you.
Regards
Ebrahim
2015 Dec 11 10:00 AM
You do not need to copy the subroutines. Just create an RFC function module with the same parameters as TADIR_GET which calls TADIR_GET.
This function just will function as a wrapper to be able to call TADIR_GET as an RFC.
2015 Dec 11 10:42 AM
Hi Peter,
you mean he has to create his own FRC function module, then he has to just select from Table TADIR as I have mentioned above.
Regards
Ebrahim
2015 Dec 11 10:55 AM
No I mean exactly what I said. You can create a RFC function module e.g. Z_TADIR_GET with exactly the same paremeters as TADIR GET
2015 Dec 11 10:58 AM
2015 Dec 11 12:58 PM
Hi and thank you all for thoses ideas and advices.
I juste have last question:
Is it possible to disable/enable constraints like foreign keys ?
I mean, I need to populate new SAP Z_package with scrambled data. If I populate SAP database table by table, foreign keys constraints will forbid me to do this. The idea is to disable those constraints like Oracle SQL command "ALTER TABLE table_name DISABLE CONSTRAINT constraint_name;".
Is there a way to do this on SAP ? Aren't thoses keys stored in DFIES_TAB table ?
2015 Dec 11 1:21 PM
Hi David,
Foreign key checks on the tables are not executed when you update the data from a program; only when user is entering data on a screen. So I don't think they'll be a problem for you.
Jim
2015 Dec 11 1:38 PM
Hi David,
"I juste have last question"
it is not problem you post many questions as you wish, we are here
Is it possible to disable/enable constraints like foreign keys ?
1- it is possible to remove the foreign keys if have copied SAP-Table to your Z-Table
2- so if you want to enter data directly to SAP-System, it is better to use FM ( FM does everything for you ) you need to just pass the values to FM, and the FM from SAP will insert into the SAP-table without any problem, ( but if you do it directly, it cause a problem and it is not advisable to change sap-tables directly, although, they have created FMs)
3. Your Z-Tables which is copied from SAP table, it is ok, there is no problem,
an Example SAP-Table: SFLIGHT,
copy to your custom table ---> Z_any_name,
Disable them in your table Z_name
I hope I could good explain and help you as you whish.
Regards
Ebrahim
2015 Dec 11 2:01 PM
Hi,
look to this screen shot, may it help you how you can disable the checks in your copied table
2015 Dec 12 1:37 PM
Thank you all.
I think my technical approach will be a mix of thoses different possibilities.
Best regards,
David
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |