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 (MM01 TCODE)

Former Member
0 Likes
1,313

Hi,

How to control views while updating data in MM01 Tcode. For example I have a 10 material numbers in my flat file,I want to control different views for every change of material number. How can i do this. Please give me the small explanation. & simple logical code.

Thanks

margani

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
1,285

http://www.sap-img.com/abap/example-how-views-are-dealt-in-bdc.htm

u also have a field PSTAT in MARA which u can use to find out what all views that MATNR had before.

11 REPLIES 11
Read only

former_member156446
Active Contributor
0 Likes
1,286

http://www.sap-img.com/abap/example-how-views-are-dealt-in-bdc.htm

u also have a field PSTAT in MARA which u can use to find out what all views that MATNR had before.

Read only

0 Likes
1,285

hi jackandjay,

Thanks for giving replay, Please explain steps involved in views control. My doubt is what we have to do while recording material number in SHDB.

Thanks

margani

Read only

0 Likes
1,285

you just do the basic recording.. by selecting all the views.. and when u put that code in program put some conditions.. like if matnr have sales view then only process the sales view...

check the link.. that should be help full in my previous post..

http://www.sap-img.com/abap/question-about-bdc-program.htm

Edited by: Jackandjay on Apr 24, 2008 7:14 PM

Read only

0 Likes
1,285

Hi Jackandjay ,

I am not getting idea about who to give the conditions in our program. Please give me the sample code with that conditions.

Thanks

margani

Read only

0 Likes
1,285
  PERFORM fill_bdc_table USING:
    'X' 'SAPLAMDP' '0100',
    ' ' 'RAIFP1-BLART' 'AA',
    ' ' 'RAIFP1-TRAVA' i_cats_parent-xvar,
    ' ' 'BDC_OKCODE' '=TAB03'.

  MOVE i_cats_parent-npy TO vl_npy.
  MOVE i_cats_parent-ncy TO vl_ncy.


  IF flag = ' '. " Py processing.
    IF NOT vl_npy IS INITIAL.  " <<<condition

      PERFORM fill_bdc_table USING:
      'X' 'SAPLAMDP' '0100',
      ' ' 'RAIFP2-ANBTR' vl_npy,
      ' ' 'RAIFP2-XAALT' 'X',
      ' ' 'BDC_OKCODE' '=TAB01'.
    ENDIF.

  ELSE.  " <<<condition

    IF NOT vl_ncy IS INITIAL.            " <<<condition

      PERFORM fill_bdc_table USING:
      'X' 'SAPLAMDP' '0100',
      ' ' 'RAIFP2-ANBTR' vl_ncy,
      ' ' 'RAIFP2-XANEU' 'X',
      ' ' 'BDC_OKCODE' '=TAB01'.
    ENDIF.
  ENDIF.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 25, 2008 11:49 AM

Read only

0 Likes
1,285

Hi Jackandjay,

Thanks for giving proper code. But here i am not understand about flag parameter. What it describe & how to define it.

Thanks

margani

Read only

0 Likes
1,285

ignore it..

its just and example I wanted to give you.. and the code that was available was that... so sent it....


IF NOT vl_npy IS INITIAL.  " <<<condition
 
      PERFORM fill_bdc_table USING:
      'X' 'SAPLAMDP' '0100',
      ' ' 'RAIFP2-ANBTR' vl_npy,
      ' ' 'RAIFP2-XAALT' 'X',
      ' ' 'BDC_OKCODE' '=TAB01'.
    ENDIF.

description: if vl_npy have any value ..

process the screen... in ur case if will the code of the view...

endif.

Read some gud documentation available on BDC using recording method.. which are available in Internet... that will be helpful..

U first start coding then things will be clear..

Read only

0 Likes
1,285

Hi,

Thanks for spending your valuable time with me, & giving replay.

Thanks

margani

Read only

0 Likes
1,285

Hi Margani,

Have You resolved Your Problem...how to control views...if not let me know....

regards,

sg

Read only

0 Likes
1,285

Hi Margani,

I expected reply from ...but no reply...any how here is the solution for Your post....

While recording when you see the views selection just press PgDn button and then select it will definately works..coz I have done that too.

<REMOVED BY MODERATOR>

Regards,

sg

Edited by: Alvaro Tejada Galindo on Apr 25, 2008 11:49 AM

Read only

0 Likes
1,285

Hi Suneel Kumar Gopisetty,

Thanks for giving replay. Please give me step by process & coding.

Thanks

margani