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

FV60 table control

Former Member
0 Likes
1,772

Hi experts,

I am facing an issue while uploading data to FV60 using BDC.

Table control accepts only the record which it can accomodate in its initial size.

Even after calling PERFORM bdc_field       USING 'BDC_OKCODE' '=P+'. it is not working.

Following is my code excerpt.

DESCRIBE TABLE it_zfi0200 LINES lv_lines.

  LOOP AT it_zfi0200 INTO wa_zfi0200.

    lv_index = sy-tabix.

    IF lv_index LT lv_lines.

      MOVE lv_index TO len.

    ELSEIF lv_index GE lv_lines.

      len = lv_lines - 1.

    ENDIF.

    CONCATENATE 'ACGL_ITEM-HKONT('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

wa_zfi0200-hkont.

    CONCATENATE 'ACGL_ITEM-SHKZG('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

                                  wa_zfi0200-shkzg.

    CONCATENATE 'ACGL_ITEM-WRBTR('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

wa_zfi0200-wrbtr.

    CONCATENATE 'ACGL_ITEM-SGTXT('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

wa_zfi0200-zname.

    IF wa_zfi0200-mwskz IS NOT INITIAL.

      CONCATENATE 'ACGL_ITEM-MWSKZ('len')'INTO fnam.

      PERFORM bdc_field       USING fnam

wa_zfi0200-mwskz.

    ELSEIF wa_zfi0200-mwskz IS  INITIAL.

      wa_zfi0200-mwskz = ' '.

      CONCATENATE 'ACGL_ITEM-MWSKZ('len')'INTO fnam.

      PERFORM bdc_field       USING fnam

wa_zfi0200-mwskz.

    ENDIF.

    CONCATENATE 'ACGL_ITEM-GSBER('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

wa_zfi0200-gsber.

    CONCATENATE 'ACGL_ITEM-KOSTL('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

                                  wa_zfi0200-kostl.

    CONCATENATE 'ACGL_ITEM-PRCTR('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

wa_zfi0200-prctr.

    CONCATENATE 'ACGL_ITEM-PROJK('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

wa_zfi0200-projk.

    CONCATENATE 'ACGL_ITEM-PERNR('len')'INTO fnam.

    PERFORM bdc_field       USING fnam

wa_zfi0200-pernr.

*    IF lv_index > 3.

    PERFORM bdc_dynpro     USING 'SAPMF05A'      '1100'.

    PERFORM bdc_field       USING 'BDC_OKCODE'

                            '=P+'.

    PERFORM bdc_dynpro      USING 'SAPMF05A' '1100'.

    PERFORM bdc_field       USING 'BDC_OKCODE'

                               '=0005'.

    PERFORM bdc_dynpro      USING 'SAPMF05A' '1100'.

    PERFORM bdc_field       USING 'BDC_OKCODE'

                               '/00'.

*    ENDIF.

    CLEAR:wa_zfi0200_1,lv_index ,len.

  ENDLOOP.

  PERFORM bdc_dynpro      USING 'SAPMF05A' '1100'.

  PERFORM bdc_field       USING 'BDC_OKCODE'

                                '=MAIN'.

  PERFORM bdc_field       USING 'BDC_CURSOR'

'ACGL_ITEM-HKONT(04)'.

  PERFORM bdc_dynpro      USING 'SAPMF05A' '1100'.

  PERFORM bdc_field       USING 'BDC_OKCODE'

                                '=BP'.

  PERFORM bdc_field       USING 'BDC_CURSOR'

'ACGL_ITEM-HKONT(04)'.

  opt-nobinpt = 'X'.

  opt-defsize = 'X'.

  opt-dismode = 'E'.

  opt-updmode = 'N'.

  CALL TRANSACTION 'FV60' USING bdcdata MESSAGES INTO wt_messtab OPTIONS  FROM opt

   MESSAGES INTO wt_messtab MODE vmode.


Regards,

PS

1 ACCEPTED SOLUTION
Read only

vamsixk
Active Participant
0 Likes
1,485

Hi Purushottam,

My advice would be to

  • use the Insert Row Button in the transaction(situated outside the border of the table control ) to insert new entries rather than the P+ logic. In this way ypu will not have to increment the counter as you ar ein ur excerpt
  • If you do have to use p+ logic and there is no other go, then u need to see in SHDB
    • how many lines are displayed for that screen when the parameter default size is set
    • then based on the number of lines displayed, keep resetting your counter to start from 1 in your code when  len = no of lines in table control (when in def size)

Regards,

Vamsi

6 REPLIES 6
Read only

vamsixk
Active Participant
0 Likes
1,486

Hi Purushottam,

My advice would be to

  • use the Insert Row Button in the transaction(situated outside the border of the table control ) to insert new entries rather than the P+ logic. In this way ypu will not have to increment the counter as you ar ein ur excerpt
  • If you do have to use p+ logic and there is no other go, then u need to see in SHDB
    • how many lines are displayed for that screen when the parameter default size is set
    • then based on the number of lines displayed, keep resetting your counter to start from 1 in your code when  len = no of lines in table control (when in def size)

Regards,

Vamsi

Read only

Former Member
0 Likes
1,485

Hi Vamsi,

How could be counter be reset to start from 1 again? won't

=P+ logic reset the counter?

Regards,

PS

Read only

vamsixk
Active Participant
0 Likes
1,485

Hi PS,

yes the Counter LEN has to be reset Everytime you perform the page down action.

Please refer to the link procided by Raymond Guiseppi for further calrification.

Regards,

Vamsi

Read only

vamsixk
Active Participant
0 Likes
1,485

HI PS,

Also try referring this thread.

http://scn.sap.com/thread/3222250

Regards,

Vamsi

Read only

Former Member
0 Likes
1,485

Hi

FV60 is sap enjoy transaction so it doesn't support the batch input, you should use the old transaction FBV1 instead of FV60, but it'll be useless to create an own bi program, because it can use the standard one RFBIBL00 or you can use the BAPI BAPI_ACC_DOCUMENT_POST

Max

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,485

Either look for BAPI allowing parking (as in my answer in discussion linked by Note 11788 - Batch input, variable step loop or table control