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

Problem with transaction record (using BAPI instead?)

former_member246634
Active Participant
0 Likes
549

Hi guys,

I have a little problem with transaction record.

1. I call transaction AS02, then I insert my data and press "Valuation Area" (I hope I translated it correctly).

2. On screen with table double-click is set on 4th row (where Area Number = 15 and Valuation Area is "MSSF") and the add next periods.

Here is my transaction record code:


  perform dynpro using:

        c_yes 'SAPLAIST'          '0100',

        c_no 'ANLA-BUKRS'        lv_bukrs,

        c_no 'ANLA-ANLN1'        lv_anln1,

        c_no 'ANLA-ANLN2'        lv_anln2,

        c_no 'BDC_OKCODE'        '=D190'.

  perform dynpro using:

        c_yes 'SAPLAIST'          '1000',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                0099KOPF',

        c_no 'BDC_SUBSCR'        'SAPLATAB                                0100TABSTRIP',

        c_no 'BDC_SUBSCR'        'SAPLATAB                                0201SUBSC',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                1190AREA1',

        c_no 'BDC_CURSOR'        'ANLB-AFABE(04)',

        c_no 'BDC_OKCODE'        '=SELZ'.

  perform dynpro using:

        c_yes 'SAPLAIST'          '0195',

        c_no 'BDC_OKCODE'        '=TDDP_OVRVW',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                0099KOPF',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                3095DEPR_PARAM',

        c_no 'BDC_CURSOR'        'ANLB-AFASL'.

  perform dynpro using:

        c_yes 'SAPLAIST'          '0195',

        c_no 'BDC_OKCODE'        '=TDDP_CINV',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                0099KOPF',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                3090DEPR_PARAM',

        c_no 'BDC_CURSOR'        'ANLBZA-AFASL(01)'.

  perform dynpro using:

        c_yes 'SAPLAIST'          '3011',

        c_no 'BDC_CURSOR'        'ANLBZA-ADATU',

        c_no 'ANLBZA-ADATU'      lv_datastart,

        c_no 'BDC_OKCODE'        '=ENTE'.

  perform dynpro using:

        c_yes 'SAPLAIST'          '0195',

        c_no 'BDC_OKCODE'        '/00',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                0099KOPF',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                3090DEPR_PARAM',

        c_no 'BDC_CURSOR'        'ANLBZA-NDPER(02)',

        c_no 'ANLBZA-NDJAR(02)'  lv_ndjar,

        c_no 'ANLBZA-NDPER(02)'  lv_ndper.

  perform dynpro using:

        c_yes 'SAPLAIST'          '0195',

        c_no 'BDC_OKCODE'        '=BUCH',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                0099KOPF',

        c_no 'BDC_SUBSCR'        'SAPLAIST                                3090DEPR_PARAM',

        c_no 'BDC_CURSOR'        'ANLBZA-AFASL(01)'.

        call transaction 'AS02'

          using it_bdc_data

          mode  lv_mode

          messages into lit_mess.

I am worried about that double-click on 4th row, because table layout can change and my row (AN = 15, VA = MSSF) might be in different place.

Is there any way to double-click on row selected in given condition? Or maybe there's a solution using BAPI?

I'll be thankful for all your answers.

Bartlomiej

1 REPLY 1
Read only

RaymondGiuseppi
Active Contributor
0 Likes
473

You could try BAPI like BAPI_FIXEDASSET_GETDETAIL to get current values and BAPI_FIXEDASSET_CHANGE to change those.

Regards,

Raymond