Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Talend team,
may I kindly ask for your help on how to use context variables in input for tSAPBapi components? For simplicity I refer to the tSAPBapi documentation example "Scenario 2" (https://help.talend.com/reader/hCrOzogIwKfuR3mPf~LydA/ljofdRaECYJBINNnF5PXsQ). See screenshot below.
For tSAPBapi input of type "table" we can use context variables in the component to feeds that input - that's working fine.
However tSAPBapi input of type "single" seems to need to be entered directly into the tSAPBapi component. In the example it's QUERY_TABLE set to "VBRK" (highlighted in the screenshot below). The question is how to supply "VBRK" from a context variable rather than having to enter it manually in the component?
I can imagine two ways:
#1 Allowing to supply input of type "single" from other components, similar to type "table" ones. We would use context variables in those feeding components
#2 Any way to use context variables in type "single" fields directly.
Background: We want to use context variables to switch Talend jobs seamlessly between development, test and production environments.
Since some of the tSAPBapi parameter are different in those environments, we'd like to supply them from context variables as well for seamless transition between environments.
Many thanks in advance for your support!
Markus
Backup: Screenshot of the referenced tSAPBapi input:
I am not sure how to put context variables in your highlighted field. Does context.myParam not work? How about using a globalMap variable? Can you put a tJavaRow before the tSAP component to set the value of your highlighted variable with a context variable, e.g.
output_row.row_QUERY_TABLE_1 = context.tableOne;
Below are general instructions on using context groups for different environments:
Create a context group with variables for each of the database connection parameters, e.g. Client, UserId, Password etc. To create a context group, right click on the 'Contexts' folder and select 'Create context group'. You can then create multiple environments for the context group, e.g. dev, test and prod with different values for the variables. To use your context group in your job's context, click the notepad icon below your job context and select the context group you want and which environment as the default. Then, in your tSAPBAPI component, instead of hardcoding the connection parameters like you have now, use context.client, context.user_id, context.password etc.
See here for documentation on creating context groups:
https://help.talend.com/reader/CZjx_~qx6zHuAklJ3AZ~Tg/Kdi_v5RSFf2UIwuzqLaZ8g
I am not sure how to put context variables in your highlighted field. Does context.myParam not work? How about using a globalMap variable? Can you put a tJavaRow before the tSAP component to set the value of your highlighted variable with a context variable, e.g.
output_row.row_QUERY_TABLE_1 = context.tableOne;
Below are general instructions on using context groups for different environments:
Create a context group with variables for each of the database connection parameters, e.g. Client, UserId, Password etc. To create a context group, right click on the 'Contexts' folder and select 'Create context group'. You can then create multiple environments for the context group, e.g. dev, test and prod with different values for the variables. To use your context group in your job's context, click the notepad icon below your job context and select the context group you want and which environment as the default. Then, in your tSAPBAPI component, instead of hardcoding the connection parameters like you have now, use context.client, context.user_id, context.password etc.
See here for documentation on creating context groups:
https://help.talend.com/reader/CZjx_~qx6zHuAklJ3AZ~Tg/Kdi_v5RSFf2UIwuzqLaZ8g