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

how to do scrolling in table control while uploading the data with recording

0 Likes
1,271

Dear Guru's

i am facing a problem for uploading the data in table control in T Code : CJ02 for project basic data uploading.

actually i need to upload 99 line item in table control but i can upload up to 17 only.

so please guide me how can i workout this?as this is my urgent requirement.

thanks in advance

regards

Raj

Moderator Message: Formulations like “Urgent “ and "ASAP" are easily interpreted as orders to people who offer help for nothing more but the satisfaction to being helpful. Thank you for taking more time to understand community help.

Please try to search in SCN for similar issues

Message was edited by: Kesavadas Thekkillath

Dear Guru's

i am facing a problem for uploading the data in table control in T Code : CJ02 for project basic data uploading.

actually i need to upload 99 line item in table control but i can upload up to 17 only.

so please guide me how can i workout this?as this is my urgent requirement.

thanks in advance

regards

Raj

Moderator Message: Formulations like “Urgent “ and "ASAP" are easily interpreted as orders to people who offer help for nothing more but the satisfaction to being helpful. Thank you for taking more time to understand community help.

Please try to search in SCN for similar issues

Message was edited by: Kesavadas Thekkillath

6 REPLIES 6
Read only

Former Member
0 Likes
1,176

You can use function code P+ (page down) after reaching end of editable area.

Since 17 lines can be added in your view, loop can be used in bdc code.

LOOP through 99 items, OKCode for page down, Fill 15 lines, ENDLOOP.

Read only

0 Likes
1,176

HI Manish,

i have already done using page down but it is not working.

Regards,

RAJ

Read only

Former Member
0 Likes
1,176

This message was moderated.

Read only

Former Member
0 Likes
1,176

Hi Nagaraj,

Use BAPI instead of BDC.

in BDC screen resolution problem will come.

so search for the BAPI for this..

Regards ,

SG

Read only

Former Member
0 Likes
1,176

If you are using SAP version above ECC5.0 then you can do the recording of the page up and and page down. You just need to increase the counter of the index For e.g.

Find the program made by for alternate BOM .

REPORT  ZCS01_BDC.

type-pools: TRUXS.

include bdcrecx1.

data: itab1 like alsmex_tabline occurs 0 with header line.

data: gd_currentrow type i.

data: IT_RAW type TRUXS_T_TEXT_DATA,

      idx type sy-index.

data: begin of record occurs 0 ,

  End_Material(018),

  PLANT(4),

  BOM_USAGE(1),

  STLAL type STLAL,

  BOM_Status type c,

  Item_Category type c,

  component_Material(018),

  component_qty(018),

  Effective_Date(010),

  Indicator    type c,

  END OF record.

  data: begin of record1 occurs 0 ,

  End_Material(018),

  PLANT(4),

  BOM_USAGE(1),

  STLAL type STLAL,

  BOM_Status type c,

  Item_Category type c,

  component_Material(018),

  component_qty(018),

  Effective_Date(010),

  Indicator    type c,

  END OF record1.

DATA: T_IDNRK(040),

      T_MENGE(040),

      T_POSTP(040),

      CT(02),

      COUNT(02).

*selection-screen begin of block b1 with frame.

*skip 3.

parameter:p_infile like rlgrap-filename obligatory MEMORY ID infle.

*skip 3.

*selection-screen end  of block b1.

at selection-screen on value-request for p_infile .

  perform value_help.

start-of-selection.

call function 'TEXT_CONVERT_XLS_TO_SAP'

    exporting

* I_FIELD_SEPERATOR =

    I_LINE_HEADER = 'X'

    I_TAB_RAW_DATA = IT_RAW " WORK TABLE

    I_FILENAME = p_infile

    tables

    I_TAB_CONVERTED_DATA = record[] "ACTUAL DATA

    exceptions

    CONVERSION_FAILED = 1

    others = 2.

  if SY-SUBRC <> 0.

    message id SY-MSGID type SY-MSGTY number SY-MSGNO

    with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

  endif.

record1[] = record[].

sort record1 by End_Material plant bom_usage stlal.

delete adjacent duplicates from record1[] comparing End_Material plant bom_usage stlal.

perform open_group.

loop at record1.

perform bdc_dynpro      using 'SAPLCSDI' '0100'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29N-STLAL'.

perform bdc_field       using 'BDC_OKCODE'                              '/00'.

perform bdc_field       using 'RC29N-MATNR'                             record1-End_Material. " '30000081'.

perform bdc_field       using 'RC29N-WERKS'                             record1-plant . " '1000'.

perform bdc_field       using 'RC29N-STLAN'                             record1-bom_usage . " '1'.

perform bdc_field       using 'RC29N-STLAL'                             record1-stlal . " '2'.

perform bdc_field       using 'RC29N-DATUV'                             record1-Effective_Date . " '2012.06.19'.

perform bdc_dynpro      using 'SAPLCSDI' '0110'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29K-ZTEXT'.

perform bdc_field       using 'BDC_OKCODE'                              '/00'.

*perform bdc_field       using 'RC29K-BMENG'                              '1'.

perform bdc_field       using 'RC29K-STLST'                              '1'.

perform bdc_dynpro      using 'SAPLCSDI' '0111'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29K-LABOR'.

perform bdc_field       using 'BDC_OKCODE'                              '/00'.

*********** DO LOOP MATERIAL ENTRY

*DO 30 TIMES.

  loop AT RECORD WHERE End_Material = RECORD1-End_Material AND

    plant = record1-plant and

    bom_usage = record1-bom_usage and

     stlal = record1-stlal.

perform bdc_dynpro      using 'SAPLCSDI' '0140'.

*perform bdc_field       using 'BDC_CURSOR'                              'RC29P-POSTP(01)'.

perform bdc_field       using 'BDC_OKCODE'                              '/00'.

PERFORM INC_INDEX.

perform bdc_field       using T_IDNRK                              record-component_Material . "'90000101'.

perform bdc_field       using T_MENGE                              record-component_qty . "'1'.

perform bdc_field       using T_POSTP                              record-Item_Category . "'L'.

*perform bdc_field       using 'RC29P-IDNRK(01)'                              '90000101'.

*perform bdc_field       using 'RC29P-MENGE(01)'                              '1'.

*perform bdc_field       using 'RC29P-POSTP(01)'                              'L'.

**************** PRESSING ENTER

perform bdc_dynpro      using 'SAPLCSDI' '0130'.

perform bdc_field       using 'BDC_OKCODE'                              '/00'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29P-POSNR'.

perform bdc_dynpro      using 'SAPLCSDI' '0131'.

perform bdc_field       using 'BDC_OKCODE'                              '/00'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29P-POTX1'.

perform bdc_field       using 'RC29P-SANKA'                              'X'.

*PRESSING NEW AFTER 14

******** IF CONDITION WHEN COUNTER IS 14. COUNTER VALUE TO BE SET AT 2

IF COUNT = 14.

perform bdc_dynpro      using 'SAPLCSDI' '0140'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29P-MENGE(14)'.

perform bdc_field       using 'BDC_OKCODE'                              '=ECMD'.

perform bdc_dynpro      using 'SAPLCSDI' '0704'.

perform bdc_field       using 'BDC_OKCODE'                              '=CLOS'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29N-DATUV'.

perform bdc_dynpro      using 'SAPLCSDI' '0140'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29P-POSNR(01)'.

perform bdc_field       using 'BDC_OKCODE'                              '=FCNP'.

COUNT = 1.

ENDIF.

********************** ENDIF

ENDLOOP.

clear count.

perform bdc_dynpro      using 'SAPLCSDI' '0140'.

perform bdc_field       using 'BDC_CURSOR'                              'RC29P-POSNR(02)'.

perform bdc_field       using 'BDC_OKCODE'                              '=FCBU'.

perform bdc_transaction using 'CS01'.

endloop.

perform close_group.

*&---------------------------------------------------------------------*

*&      Form  INC_INDEX

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

form INC_INDEX .

COUNT = COUNT + 1.

CT = COUNT.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

  EXPORTING

    input         = CT

IMPORTING

   OUTPUT        = CT

          .

CONCATENATE 'RC29P-IDNRK(' CT ')' INTO T_IDNRK .

CONCATENATE 'RC29P-MENGE(' CT ')' INTO T_MENGE .

CONCATENATE 'RC29P-POSTP(' CT ')' INTO T_POSTP .

endform.                    " INC_INDEX

*&---------------------------------------------------------------------*

*&      Form  VALUE_HELP

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM VALUE_HELP .

  call function 'DSVAS_DOC_WS_FILENAME_GET_50'

    exporting

      def_filename     = ' '

      def_path         = ' '

      mask             = ',*.*,*.*.'

      mode             = 'O'

      title            = ' '

    importing

      filename         = p_infile

    exceptions

      inv_winsys       = 1

      no_batch         = 2

      selection_cancel = 3

      selection_error  = 4

      others           = 5.

  if sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

  endif.

ENDFORM.                    " VALUE_HELP

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,176

As already written, identify the function code associated to page up/down in CJ02 transactin and adapt your BDC. But diid you look at BAPI for Project System ?

Regards,

Raymond