Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC Program For IK01

Former Member
0 Likes
1,298

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

7 REPLIES 7
Read only

former_member201275
Active Contributor
0 Likes
1,078

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:

Read only

0 Likes
1,078

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.

Read only

dibyajeeban_jena
Active Participant
0 Likes
1,078

Hi Sam,

Check below table..

According  to  Object Category dynamically assign the screen number .

Regards

DJ

Read only

0 Likes
1,078

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

Read only

0 Likes
1,078

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

Read only

0 Likes
1,078


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

Read only

0 Likes
1,078

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