Cancel
Showing results for 
Search instead for 
Did you mean: 

Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Hi everyone,

 

We are trying to map TC attributes to custom attributes in SAP DIR. We are working with TC 11.3 and T4S 11.3. Below is the detailed use case.

 

Customer has some custom attributes in SAP DIR that are managed in a custom table.They have created a custom BAPI that manages the custom attributes. So the default BAPI for DIR, BAPI_DOCUMENT_CREATE2 calls this custom BAPI which manages the custom attributes.

Using the GS script script create_code4genericSAP_call.tcl we were able to generate a mapping file for the custom BAPI. In the mapping file we are able to see all the custom attribute that we want to map.

 

Here is the challenge,

We tried adding the procedures given in the mapping file in the namespace in DIR mapping file and entered dummy values for the custom SAP attributes in the mapping file.

Deployed the changes and executed the transaction.

In the logs we are able to see that the custom BAPI is being called but the attribute values set in the array are not transferred to SAP. In the logs it shows that the values for these attributes are empty, we are assuming that the program is not able to read the values from the mapping file and that some piece of code is missing for the procedure for custom BAPI.

There seems to be no documentation that would be of help in this situation. So any help for this issue is very much appriciated.

 

Thanks and Regards,

Sanket Pusalkar

9 REPLIES

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Valued Contributor
Valued Contributor

Sanket,

 

Please share your code snippet, it's hard to analyze issue without looking at the code. Thanks!

 

Regards,

Nitesh

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Dear Nitesh,

 

Which code snippet would you need to see?

the one of the custom mapping file or the DIR mapping file?

Please elaborate a little more.

 

Thanks and Regards,

Sanket Pusalkar

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Valued Contributor
Valued Contributor

Sanket,

 

I'm interested to see custom mapping file, how you're setting these values. Also could you try :

1. To print variable in transaction log before sending to SAP.

2. Try to copy same piece of code to DIR mapping file and see whether it works or not, if it does that means proplem is with your custom mapping file.

 

Regards,

Nitesh

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Valued Contributor
Valued Contributor

@Sanket_Pusalkar Just make sure the SAP custom function module is Remote-Enabled so that t4s can execute it remotely (see attached). If its already done, SAP system logs for the interface user should give more details. 

The other option is to use a different function. I assume you are using "::TPSAP:: performSapCall $SAPInDataDict" function. Instead you can try an undocumented call "::TPSAP::MISCELLANEOUS:: performGenericSapCall $SapCall $strArrayName $strArrayPattern $Commit $CaloInit" which we are using in T4S 11.2.3 & it works perfectly. Good Luck !

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Solution Partner Honored Contributor Solution Partner Honored Contributor
Solution Partner Honored Contributor
@SantoshMurthy, the image is unreadable and can you check that $CaloInit is correct?

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Valued Contributor
Valued Contributor

@RandyEllsworth Thanks for pointing that out ! I have updated the picture...hope its better this time !

$CaloInit is correct. There is no typo. It refers to initialization of CALO function group in SAP. More details here http://www.se80.co.uk/sapfms/c/calo/calo_init_api.htm 

 

 

 

 

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Dear Santosh sir,

 

Thank you for the information, i will check the said things and update the thread.

 

Regards,

Sanket Pusalkar

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

Dear Nitesh,

I will upload the snaps of the custom mapping file shortly. Also, we have tried coping the same piece of code and adding it to the DIR mapping file. the same result is noted, the function is called but the attributes are not transferred. 

Regards,
Sanket Pusalkar

Re: Map TC attributes to custom attributes in SAP DIR using T4S 11.3

@Nitesh_Thakur I am uploading the DIR mapping file having the piece of custom code generated from the script as described earlier. Please note that, the code starts at line no.191 and ends at the end of the file at line no. 578. The value of the attribute is set at line no. 303.

 

Regards,

Sanket Pusalkar.