Skip to Content
avatar image
Former Member

Can we do BDC Recording for Memasssa T-code

HI team, MY requirement is to update confirmation control key as blank (EKPO-BSTAE).

To update this value we are using mass transaction MEMASSSA in the custom program as null value can not be updated ME32l.

I have done BDC recording for MEMASSSA t-code, but when i am processing it null values is not getting updated. Manually i can able to do it using MEMASSSA.

Can we do BDC recording for Memasssa t code?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Aug 20, 2017 at 04:18 PM

    If the control key cannot be updated online because of a receipt , then it can't be updated with with mass change transaction and not with a BDC either.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for your response,

      I have recorded recording in SHDB for MEMASSSA t-code, when I process recording data would update correctly and when I convert same recording in to program or create session it successfully processes, but values are not getting updated.

      To understand this issue I have debugged the standard code behind MEMASSSA t-code.

      Processing only recording in SHDB: There is a function module I_MASS_SAVE_DATA this FM is responsible to update table values successfully. the FM contains COMMIT WORK statement inside.

      Processing same recording after converting into a the program: after =SAVE compiler reaches to I_MASS_SAVE_DATA and inside the FM when COMMIT WORK is triggered BDC SESSION would be completed and values would not be updated as compiler doesn't process FM after COMMIT WORK statement.

      Is there any solution to process BDC SESSION after COMMIT WORK statement and update the values as RECORDING does.

      Thank you.

  • Aug 19, 2017 at 09:12 AM

    Don't know for MEMASSSA, but the classic troubleshooting procedure for any BDC which "doesn't work" is to run it screen by screen, and see where the problem is, and solve it (or ask the forum with a more specific question / search the forum before asking of course).

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 19, 2017 at 09:27 AM

    Why does a transaction that does mass maintenance need to be recorded and cannot be used directly, it even has the capability to run in batch.

    Such change should be a one-time activity, and you should rather correct your master data to avoid that you get a confirmation control key that you do not want

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for your response,

      I agree with you, But as per my requirement confirmation control key needs to be updated through ME32L, but EKPO-BSTAE cannot be updated for SA which has GR values, so my team decided to use MEMASSSA t code to update EKPO-BSTAE values from the program. I recorded screen recording in SHDB, when I process, it updates confirmation control key, but after converting recording into a program and executing the value is not getting updated.

      after 'BDC_OKCODE' '=SAVE' performs the batch would be completed successfully but values are not updated .

      please find the asmple recording for your reference.

      perform bdc_dynpro using 'SAPMMSDL' '0200'.

      perform bdc_field using 'BDC_OKCODE' '=TAB2'.

      perform bdc_field using 'BDC_CURSOR' 'MASSTABS-TABTXT(03)'.

      perform bdc_field using 'MASSTABS-MARK(03)' 'X'.

      perform bdc_dynpro using 'SAPMMSDL' '0200'.

      perform bdc_field using 'BDC_CURSOR' 'MASSSCREEN-VARNAME'.

      perform bdc_field using 'BDC_OKCODE' '=FIND'.

      perform bdc_dynpro using 'SAPLSPO4' '0300'.

      perform bdc_field using 'BDC_CURSOR' 'SVALD-VALUE(01)'.

      perform bdc_field using 'BDC_OKCODE' '=FURT'.

      perform bdc_field using 'SVALD-VALUE(01)' 'BSTAE'.

      perform bdc_dynpro using 'SAPMMSDL' '0200'.

      perform bdc_field using 'BDC_OKCODE' '=NEXT'.

      perform bdc_field using 'BDC_CURSOR' 'MASSFVIEW-FIELDTEXT(01)'.

      perform bdc_field using 'MASSFVIEW-CHECKBOX(01)' 'X'.

      perform bdc_dynpro using 'SAPLMASS_SEL_DIALOG' '0100'.

      perform bdc_field using 'BDC_OKCODE' '=CRET'.

      perform bdc_field using 'BDC_CURSOR' 'MASSFREESEL-LOW(01)'.

      perform bdc_field using 'MASSFREESEL-LOW(01)' '5500000100'.

      perform bdc_dynpro using 'SAPLMASSINTERFACE' '0200'.

      perform bdc_field using 'BDC_OKCODE' '=FDAE'.

      perform bdc_field using 'BDC_CURSOR' 'NR_ITEMS'.

      perform bdc_dynpro using 'SAPLMASSINTERFACE' '0200'.

      perform bdc_field using 'BDC_OKCODE' '=SAVE'.

      perform bdc_field using 'BDC_CURSOR' 'NR_ITEMS'.

      I am passing PO numbers in loop to this recording to udate key values for all line itesms using BDC session method.

      Could you lease help on this.

  • avatar image
    Former Member
    Aug 28, 2017 at 04:08 AM

    Thanks for your response,

    I have recorded recording in SHDB for MEMASSSA t-code, when I process recording data would update correctly and when I convert same recording in to program or create session it successfully processes, but values are not getting updated.

    To understand this issue I have debugged the standard code behind MEMASSSA t-code.

    Processing only recording in SHDB: There is a function module I_MASS_SAVE_DATA this FM is responsible to update table values successfully. the FM contains COMMIT WORK statement inside.

    Processing same recording after converting into a the program: after =SAVE compiler reaches to I_MASS_SAVE_DATA and inside the FM when COMMIT WORK is triggered BDC SESSION would be completed and values would not be updated as compiler doesn't process FM after COMMIT WORK statement.

    Is there any solution to process BDC SESSION after COMMIT WORK statement and update the values as RECORDING does?

    Thank you.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 28, 2017 at 05:24 AM

    Based on your further investigation, your only issue is that the ABAP code stops right after COMMIT WORK.

    If you search the forum, you'll see that it's a normal BDC behavior.

    The only way of continuing after COMMIT WORK is to use CALL TRANSACTION ... USING ... (CTU) with a special option ; please refer to the ABAP documentation (+ search forum if you need further assistance).

    Note that a Batch Input Session (it's not a CTU) always stops after a COMMIT WORK, there's no way to avoid this (or execute the data of the batch input session via CTU).

    PS: 1) a compiler does not execute code, it compiles programs. 2) You are declaring that the recording works successfully ("processing only recording"), but using the word "recording" is misleading as in fact you're just saying that the normal transaction, being recorded by the way, works successfully (of course! The recording of a transaction works 99% identically to the normal transaction).

    Add comment
    10|10000 characters needed characters exceeded