cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ECTR - automatically assign value to folder characteristic

giancarlo_adamo
Explorer
0 Kudos
563

Hello,

I'm in ECTR and I need to automatically fill values to some characteristics during new folder creation.

I activated the parameter:

characteristic_assignment_folder=yes

in the dtype definition and it works very fine for standard documents. When I create a new document, ECTR proposes the new values from the parent folder.

Unfortunately, it does not work for folders. When a create a new folder inside an existing one nothing happen.

I think that this is because when I create a new folder, ECTR does not show the list of available characteristics for the selected document type (FOL), but I don't know if I can change this behavior.

Hope someone could help me.

Accepted Solutions (1)

Accepted Solutions (1)

se_kie
Advisor
Advisor
0 Kudos

Oh yes you are right. I just tested it in debugger only.

Then you need a RFC Wrapper for /DSCSAG/FOL3_CREATE2. In IT_FOLDER_DATA you have to change value for field COPYTOPFOLCLASS to 'X'.

Best regards,
Sebastian

Answers (3)

Answers (3)

giancarlo_adamo
Explorer
0 Kudos

Now it works.

Thank you very much.

giancarlo_adamo
Explorer
0 Kudos

Thank's Sebastian for your reply.

I created the wrapper and updated default.txt but the new function is not triggered.

I tried to run it manually from SAP and it works fine.

Then I looked inside the ECTR log file, I found that ECTR runs a different function to create a new folder:

/DSCSAG/FOL3_CREATE2

That function calls/DSCSAG/FOL3_CREATE that finally calls /DSCSAG/FOL_CREATE.

Note that /DSCSAG/FOL_CREATE is not RFC enabled.

I'm in ECTR 5.1.16

Regards

se_kie
Advisor
Advisor
0 Kudos

Sorry, this feature is not yet implemented but planned for a future release.

In meanwhile you can do it like that:

  • Create a Z-RFC-FM wrapper e.g. "Z_FOL_CREATE_WRAPPER" with same interface like "/DSCSAG/FOL_CREATE".
  • Inside call /DSCSAG/FOL_CREATE with same parameters and IV_COPYTOPFOLCLASS = X.
  • Add this pref into default.txt:
    sap.bapi.replace./DSCSAG/FOL_CREATE=Z_FOL_CREATE_WRAPPER

Best regards,
Sebastian