on 07-13-2016 5:14 AM
Hi Experts,
I have a scenario. File --> PI --> IDOC . All control records of IDOC i.e. EDI_DC40 are passed as constant. For example, RCVPRN is passed as
DEVCLNT000. I want "RCVPRN " to pick up the value as QACLNT000 while changes are transported into QA.
Is there any way, either by UDF or by through some other mean, We can do this in PI DEV environment.
Please help.
Regards
Veeru
Hi Veer,
The only approaches will work are -
1. Parameterized mapping and trust me it is the most suitable to use.
2. Use the UDF as suggested by Priyanka ( but in this case you have to case you have to hardcode the first 3 letters of system name and if in worst cases it changes then everything will fall apart)
Regards,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As mentioned by others in the previous posts, you can use UDF to get the system name and then send the respective value in RCVPRN field.
Here is the sample code.
String systemName = System.getProperty("SAPSYSTEMNAME");
String str = systemName.substring(0,3);
if(str.equals("DEV"))
return devSystem;
else
return qual;
If you are using IDoc_AAE adapter, then this requirement can be achieved without making any changes to mapping. You can just Override the Idoc control Headers with the value you want to pass.
---Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bhavesh has already answered how to achieve it.
I can only add that you have to fill in only two mandatory parameters: SNDPRT and SNDPRN.
Regards,
/k
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use UDF to get the system name(Dev/Q/P) and then maintain required values in Fixed values , so that the values are taken with respective of the environment.
Or you can use Header Mapping too.
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would not suggest using the approach of getting the System ID in your mapping and then mapping the target fields as this leads to hardcoding where if tomorrow the SID changes or an additional system is introduced in the landscape then there are unnecessary transports / mapping changes are required.
The cleanest approach is
- Use Header Mapping as Manoj has already pointed where the IDoc control record is then populated using the Business System details. I assume there is a reason why you want to hard code this in EDI_DC40 in your mapping and not use Header Mapping but would ask you to check if this is applicable.
- Use Parametric Mapping / Value Mapping
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.