15 Replies Latest reply: Dec 27, 2005 10:23 AM by Eswar Reddy Kanakanti RSS

BDC FOR INFOTYPE 0006 IN pa30

Abhishek Suppal
Currently Being Moderated

hi i have the following bdc..

 

 

REPORT zbapi NO STANDARD PAGE HEADING LINE-SIZE 255.

INCLUDE bdcrecx1.

START-OF-SELECTION.

  PERFORM open_group.

  PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '/00'.
  PERFORM bdc_field       USING 'RP50G-PERNR'
                                '1'.
  PERFORM bdc_field       USING 'RP50G-TIMR6'
                                'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'RP50G-SUBTY'.
  PERFORM bdc_field       USING 'RP50G-CHOIC'
                                '6'.
  PERFORM bdc_field       USING 'RP50G-SUBTY'
                                '2'.

  PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'RP50G-PERNR'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=MOD'.
  PERFORM bdc_field       USING 'RP50G-PERNR'
                                '1'.
  PERFORM bdc_field       USING 'RP50G-TIMR6'
                                'X'.
  PERFORM bdc_field       USING 'RP50G-CHOIC'
                                'Addresses (IT0006)'.
  PERFORM bdc_field       USING 'RP50G-SUBTY'
                                '2'.

  PERFORM bdc_dynpro      USING 'MP000600' '2004'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'P0006-STATE'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '/00'.
  PERFORM bdc_field       USING 'P0006-STATE'
                                'SA'.
  PERFORM bdc_field       USING 'P0006-LAND1'
                                'AU'.

  PERFORM bdc_dynpro      USING 'MP000600' '2004'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'P0006-BEGDA'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=UPD'.
  PERFORM bdc_field       USING 'P0006-STATE'
                                'SA'.
  PERFORM bdc_field       USING 'P0006-LAND1'
                                'AU'.

  PERFORM bdc_transaction USING 'PA30'.

  PERFORM close_group.

 

i want to change the STATE nd LAND1, but by using the above BDC it doesn't change the value i pass, but it works with normal run can any one see wat's wrong witd the above BDC.

 

abhishek suppal

  • Re: BDC FOR INFOTYPE 0006 IN pa30
    Prashant Patil
    Currently Being Moderated

    Hi,

     

    Instead of BDC_OKCODE as '/00' pass '=UPD'.

     

    PERFORM bdc_dynpro      USING 'MP000600' '2004'.

      PERFORM bdc_field       USING 'BDC_CURSOR'

                                    'P0006-STATE'.

      PERFORM bdc_field       USING 'P0006-STATE'

                                    'SA'.

      PERFORM bdc_field       USING 'P0006-LAND1'

                                    'AU'.

    PERFORM bdc_field       USING 'BDC_OKCODE'

                                    '=UPD'.

     

    ****

      PERFORM bdc_dynpro      USING 'MP000600' '2004'.

      PERFORM bdc_field       USING 'BDC_CURSOR'

                                    'P0006-BEGDA'.

     

      PERFORM bdc_field       USING 'P0006-STATE'

                                    'SA'.

      PERFORM bdc_field       USING 'P0006-LAND1'

                                    'AU'.

      PERFORM bdc_field       USING 'BDC_OKCODE'

                                    '=UPD'.

     

     

    Best regards,

    Prashant

  • Re: BDC FOR INFOTYPE 0006 IN pa30
    Amit Mittal
    Currently Being Moderated

    Hi Abhishek,

     

     

    1. I tried your code.

     

    2. For my side,

       i modified the PERNR and subtype.

     

    3. It works well now.

     

    4. Try this code (just copy paste)

       I have commented out some lines,which were

       not required,

       Moreover, the SCREEN NUMBER in our case was

       2000.

        U can use yours.

     

    5.

     

    REPORT zbapi NO STANDARD PAGE HEADING LINE-SIZE 255.

     

    INCLUDE bdcrecx1.

     

    START-OF-SELECTION.

     

      PERFORM open_group.

     

      PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.

      PERFORM bdc_field       USING 'BDC_OKCODE'

                                    '/00'.

      PERFORM bdc_field       USING 'RP50G-PERNR'

                                    '776'.

      PERFORM bdc_field       USING 'RP50G-TIMR6'

                                    'X'.

      PERFORM bdc_field       USING 'BDC_CURSOR'

                                    'RP50G-SUBTY'.

      PERFORM bdc_field       USING 'RP50G-CHOIC'

                                    '6'.

      PERFORM bdc_field       USING 'RP50G-SUBTY'

                                    '1'.

     

      PERFORM bdc_field       USING 'BDC_OKCODE'

                                    '=MOD'.

     

    • PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.

    • PERFORM bdc_field       USING 'BDC_CURSOR'

    •                                'RP50G-PERNR'.

    • PERFORM bdc_field       USING 'RP50G-PERNR'

    •                                '1'.

    • PERFORM bdc_field       USING 'RP50G-TIMR6'

    •                                'X'.

    • PERFORM bdc_field       USING 'RP50G-CHOIC'

    •                                'Addresses (IT0006)'.

    • PERFORM bdc_field       USING 'RP50G-SUBTY'

    •                                '1'.

    *

      PERFORM bdc_dynpro      USING 'MP000600' '2000'.

    • PERFORM bdc_field       USING 'BDC_CURSOR'

    •                                'P0006-STATE'.

    • PERFORM bdc_field       USING 'BDC_OKCODE'

    •                                '/00'.

    • PERFORM bdc_field       USING 'P0006-STATE'

    •                                'SA'.

    • PERFORM bdc_field       USING 'P0006-LAND1'

    •                                'AU'.

    *

    • PERFORM bdc_dynpro      USING 'MP000600' '2004'.

    • PERFORM bdc_field       USING 'BDC_CURSOR'

    •                                'P0006-BEGDA'.

     

      PERFORM bdc_field       USING 'BDC_OKCODE'

                                    '=UPD'.

      PERFORM bdc_field       USING 'P0006-STATE'

                                    'SA'.

      PERFORM bdc_field       USING 'P0006-LAND1'

                                    'AU'.

     

      PERFORM bdc_transaction USING 'PA30'.

     

      PERFORM close_group.

       

     

     

    I hope it helps.

     

    regards,

    amit m.

    • Re: BDC FOR INFOTYPE 0006 IN pa30
      Abhishek Suppal
      Currently Being Moderated

      hi amit

       

      REPORT zbapi NO STANDARD PAGE HEADING LINE-SIZE 255.
      
      INCLUDE bdcrecx1.
      
      START-OF-SELECTION.
      
        PERFORM open_group.
      
        PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RP50G-PERNR'
                                      '1'.
        PERFORM bdc_field       USING 'RP50G-TIMR6'
                                      'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RP50G-SUBTY'.
        PERFORM bdc_field       USING 'RP50G-CHOIC'
                                      '6'.
        PERFORM bdc_field       USING 'RP50G-SUBTY'
                                      '2'.
      
        PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RP50G-PERNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=MOD'.
        PERFORM bdc_field       USING 'RP50G-PERNR'
                                      '1'.
        PERFORM bdc_field       USING 'RP50G-TIMR6'
                                      'X'.
        PERFORM bdc_field       USING 'RP50G-CHOIC'
                                      'Addresses (IT0006)'.
        PERFORM bdc_field       USING 'RP50G-SUBTY'
                                      '2'.
      
        PERFORM bdc_dynpro      USING 'MP000600' '2004'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=UPD'.
      *  PERFORM bdc_field       USING 'BDC_CURSOR'
      *                                'P0006-STATE'.
        PERFORM bdc_field       USING 'P0006-STATE'
                                      'SA'.
        PERFORM bdc_field       USING 'P0006-LAND1'
                                      'AU'.
        PERFORM bdc_transaction USING 'PA30'.
      
        PERFORM close_group.

       

       

      i tried this but it takes the blank field in STATE i m not able to understand why its doing so.....

       

      It takes the blank value in STATE Field, if i pass SA....

       

      abhishek suppal

       

       

      Message was edited by: Abhishek Suppal

       

      • Re: BDC FOR INFOTYPE 0006 IN pa30
        Amit Mittal
        Currently Being Moderated

        Hi again,

         

        1. u are right.

        2. i tried your code in 'A' Mode (display all screens)

            

           (It was giving error / it was getting stuck

            in between becasue of wrong sequence

            of populating the fields and okcode)

            

            Moreover it was not saving the transaction

         

           However i rectified that.

         

        3. I had to change the screen number to 2000(in my case)

           so that the effect comes.

         

        4. Please test your screen number also.

           Is it 2000 or something else.

         

        5. Did u try my code. (It works fantastic)

          ( it is your code only with minor modification)

           

           Just check it once again

           (if u need, modify it a little for pernr, etc)

         

        regards,

        amit m.

         

         

        Message was edited by: Amit Mittal

         

         

        Message was edited by: Amit Mittal

         

  • Re: BDC FOR INFOTYPE 0006 IN pa30
    Prashant Patil
    Currently Being Moderated

    Hi,

     

    One more point to mention is :-

     

    You need to pass corresponding state numbers instead of state names for the STATE field.

     

     

    Best regard,

    Prashant

  • Re: BDC FOR INFOTYPE 0006 IN pa30
    Prashant Patil
    Currently Being Moderated

    Hi Abhishek,

     

    Pass corresponding number for State Names.

     

    This is the only error in your program.

     

     

    Best regards,

    Prashant

  • Re: BDC FOR INFOTYPE 0006 IN pa30
    sridhar reddy kondam
    Currently Being Moderated

    Hi Abhishek,

    I have tried the same and i hope that state and land1 can be updated.... Only one thing u have to do is check whether the corrsponding country key has(Land1-AU has State -SA or not ) just check whether For Land1 there is corresponding State availabe in table <b>T005S</b>....

     

     

    u can see the following code which has been working..

     

    perform open_group.

     

    perform bdc_dynpro      using 'SAPMP50A' '1000'.

    perform bdc_field       using 'BDC_OKCODE'

                                  '=ZEIT'.

    perform bdc_field       using 'RP50G-PERNR'

                                  '3'.

    perform bdc_field       using 'BDC_CURSOR'

                                  'T582S-ITEXT(04)'.

    perform bdc_field       using 'RP50G-SELEC(04)'

                                  'X'.

    perform bdc_field       using 'RP50G-TIMR6'

                                  'X'.

    perform bdc_dynpro      using 'SAPMP50A' '1000'.

    perform bdc_field       using 'BDC_CURSOR'

                                  'RP50G-PERNR'.

    perform bdc_field       using 'BDC_OKCODE'

                                  '=INS'.

    perform bdc_field       using 'RP50G-PERNR'

                                  '3'.

    perform bdc_field       using 'RP50G-TIMR6'

                                  'X'.

    perform bdc_field       using 'RP50G-CHOIC'

                                  'Addresses'.

    perform bdc_dynpro      using 'MP000600' '2008'.

    perform bdc_field       using 'BDC_CURSOR'

                                  'P0006-STATE'.

    perform bdc_field       using 'BDC_OKCODE'

                                  '=UPD'.

    perform bdc_field       using 'P0006-BEGDA'

                                  '25.08.2003'.

    perform bdc_field       using 'P0006-ENDDA'

                                  '31.12.9999'.

    perform bdc_field       using 'P0006-ANSSA'

                                  '1'.

    perform bdc_field       using 'P0006-STRAS'

                                  '1234'.

    perform bdc_field       using 'P0006-PSTLZ'

                                  '124567'.

    perform bdc_field       using 'P0006-STATE'

                                  'SG'.

    perform bdc_field       using 'P0006-LAND1'

                                  'GB'.

    perform bdc_transaction using 'PA30'.

     

    perform close_group.

     

    Regards,

    Sridhar Reddy k

     

     

    Message was edited by: sridhar reddy kondam

     

    • Re: BDC FOR INFOTYPE 0006 IN pa30
      sridhar reddy kondam
      Currently Being Moderated

      Hi Abhishek,

      Just check whether the Region/state avaialable for the coreeponding Country... in table <b>T005S</b> ...

       

      u can see the following code which has been working..

       

      perform open_group.

       

      perform bdc_dynpro      using 'SAPMP50A' '1000'.

      perform bdc_field       using 'BDC_OKCODE'

                                    '=ZEIT'.

      perform bdc_field       using 'RP50G-PERNR'

                                    '3'.

      perform bdc_field       using 'BDC_CURSOR'

                                    'T582S-ITEXT(04)'.

      perform bdc_field       using 'RP50G-SELEC(04)'

                                    'X'.

      perform bdc_field       using 'RP50G-TIMR6'

                                    'X'.

      perform bdc_dynpro      using 'SAPMP50A' '1000'.

      perform bdc_field       using 'BDC_CURSOR'

                                    'RP50G-PERNR'.

      perform bdc_field       using 'BDC_OKCODE'

                                    '=INS'.

      perform bdc_field       using 'RP50G-PERNR'

                                    '3'.

      perform bdc_field       using 'RP50G-TIMR6'

                                    'X'.

      perform bdc_field       using 'RP50G-CHOIC'

                                    'Addresses'.

      perform bdc_dynpro      using 'MP000600' '2008'.

      perform bdc_field       using 'BDC_CURSOR'

                                    'P0006-STATE'.

      perform bdc_field       using 'BDC_OKCODE'

                                    '=UPD'.

      perform bdc_field       using 'P0006-BEGDA'

                                    '25.08.2003'.

      perform bdc_field       using 'P0006-ENDDA'

                                    '31.12.9999'.

      perform bdc_field       using 'P0006-ANSSA'

                                    '1'.

      perform bdc_field       using 'P0006-STRAS'

                                    '1234'.

      perform bdc_field       using 'P0006-PSTLZ'

                                    '124567'.

      perform bdc_field       using 'P0006-STATE'

                                    'SG'.

      perform bdc_field       using 'P0006-LAND1'

                                    'GB'.

      perform bdc_transaction using 'PA30'.

       

      perform close_group.

       

      Regards,

      Sridhar Reddy k

  • Re: BDC FOR INFOTYPE 0006 IN pa30
    Amit Mittal
    Currently Being Moderated

    Hi again,

     

    1. As u say ur screen number is 2004,

     

    2. try this code again (just copy paste)

       It has your screen number,

       your personnel number 1, and subtype 2

     

    3.  In Region TAS should come (Tasmania)

     

    4. Check it in A Mode.

     

    REPORT zbapi NO STANDARD PAGE HEADING LINE-SIZE 255.

     

    INCLUDE bdcrecx1.

     

    START-OF-SELECTION.

     

      PERFORM open_group.

     

      PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.

      PERFORM bdc_field       USING 'BDC_OKCODE'

                                    '/00'.

      PERFORM bdc_field       USING 'RP50G-PERNR'

                                    '1'.

      PERFORM bdc_field       USING 'RP50G-TIMR6'

                                    'X'.

      PERFORM bdc_field       USING 'BDC_CURSOR'

                                    'RP50G-SUBTY'.

      PERFORM bdc_field       USING 'RP50G-CHOIC'

                                    '6'.

      PERFORM bdc_field       USING 'RP50G-SUBTY'

                                    '2'.

     

      PERFORM bdc_field       USING 'BDC_OKCODE'

                                    '=MOD'.

     

    • PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.

    • PERFORM bdc_field       USING 'BDC_CURSOR'

    •                                'RP50G-PERNR'.

    • PERFORM bdc_field       USING 'RP50G-PERNR'

    •                                '1'.

    • PERFORM bdc_field       USING 'RP50G-TIMR6'

    •                                'X'.

    • PERFORM bdc_field       USING 'RP50G-CHOIC'

    •                                'Addresses (IT0006)'.

    • PERFORM bdc_field       USING 'RP50G-SUBTY'

    •                                '1'.

    *

      PERFORM bdc_dynpro      USING 'MP000600' '2004'.

    • PERFORM bdc_field       USING 'BDC_CURSOR'

    •                                'P0006-STATE'.

    • PERFORM bdc_field       USING 'BDC_OKCODE'

    •                                '/00'.

    • PERFORM bdc_field       USING 'P0006-STATE'

    •                                'SA'.

    • PERFORM bdc_field       USING 'P0006-LAND1'

    •                                'AU'.

    *

    • PERFORM bdc_dynpro      USING 'MP000600' '2004'.

    • PERFORM bdc_field       USING 'BDC_CURSOR'

    •                                'P0006-BEGDA'.

     

      PERFORM bdc_field       USING 'BDC_OKCODE'

                                    '=UPD'.

      PERFORM bdc_field       USING 'P0006-STATE'

                                    'TAS'.

      PERFORM bdc_field       USING 'P0006-LAND1'

                                    'AU'.

     

      PERFORM bdc_transaction USING 'PA30'.

     

      PERFORM close_group.

     

    regards,

    amit m.

Actions