‎2014 Mar 03 10:00 AM
Hi,
I have a requirement to upload measuring point (IK01) using BDC.
The problem is how to create a BDC to switch between MeasPointObject
For example
Record1 for equipment using MeasPointObject IEQ
Record2 for functional location using MeasPointObject IFL
It seems I can't create a BDC to switch between these 2 screens. So whenever the BDC tries to upload the IFL it will prompt an error saying the IFL field does not exist.
Please advice,
Thanks,
Sam
‎2014 Mar 03 10:16 AM
Hi Sam,
Not sure I understand exactly your problem, but if it is the situation where you have 2 different possible dynpros depending on the record you are loading then it shouldn't be too difficult.
LOOP on records.
IF Record1. "for IEQ
Perform dynpro using:
* here logic for screen of IEQ
ENDIF.
IF Record2. "for IFL
Perform dynpro using:
* here logic for screen of IFL
ENDIF.
ENDLOOP:
‎2014 Mar 03 10:38 AM
Hi Glen
The sap program and the screen number for both scenario is the same.
The only difference is the column reference for IEQ (EQUI-EQUNR) and IFL (IFLOT-TPLNR)
You could see it for yourself using IK01 and switch the measuringpointobj between IEQ and IFL.
This screen is kind of unique, you see the default screen is using the IEQ so whenever you run a BDC to fill the IFL data, then error will occur saying IFLOT-TPLNR does not exist in SAPLIMR0 scr 1110
So you need to manually "trigger" the IK01 screen first into IFL by selecting IFL on the measuringpointobj.
After that the column will be recognised which I think this is not solving any problem.
‎2014 Mar 03 10:20 AM
Hi Sam,
Check below table..
According to Object Category dynamically assign the screen number .
Regards
DJ
‎2014 Mar 03 11:04 AM
Hi DJ,
How do i implement this in BDC code? Could you please give me a sample code?
I tried to switch to IFLOT using:
PERFORM dynpro USING: '' 'SAPLIMR4' '7501'.
PERFORM dynpro USING: ' ' 'IFLOT-TPLNR' wa_data-equnr.
But still doesn't recognised it. I also try to assign it as a subscreen with no avail.
Thank you,
Sam
‎2014 Mar 04 11:44 AM
HI,
put condition as below as per MeasPointObjec , do different recording for diff MeasPointObjec and put condition .
if WA_DATA = 'X' . " for IFL
perform bdc_dynpro using 'SAPLIMR0' '1110'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RIMR0-MPOTY'
'IFL'.
perform bdc_field using 'IMPT-MPTYP'
'M'.
perform bdc_field using 'BDC_CURSOR'
'IFLOT-TPLNR'.
perform bdc_field using 'IFLOT-TPLNR'
'AMHC-ALM'.
ELSE. " FOR IEQ
perform bdc_dynpro using 'SAPLIMR0' '1110'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RIMR0-MPOTY'
'IEQ'.
perform bdc_field using 'IMPT-MPTYP'
'M'.
perform bdc_field using 'BDC_CURSOR'
'EQUI-EQUNR'.
perform bdc_field using 'EQUI-EQUNR'
'10000096'.
ENDIF .
perform bdc_dynpro using 'SAPLIMR0' '5110'.
....
...
....
Regards
DJ
‎2014 May 07 2:54 PM
Hi Sam Indra,
How did you resolve this issue? It is working fine in foreground and display error only mode. Not working for background.
Thanking you.
Raju
‎2014 May 07 5:54 PM
Hi,
Try setting the parameter id 'IPO' first, then call the field in bdc.
lv_mtype = 'IFL' "FL OR
lv_mtype = 'IEQ' "EQ
SET PARAMETER ID 'IPO' FIELD lv_mtype.
PERFORM f_bdc_field USING 'RIMR0-MPOTY' lv_mtype.
Regards
Hari