07-11-2007 12:29 PM
Hi!,
I have a problem with read/modify the repetitve structure. I feel that to read/modify the repetitve structure I cant use just a new structure as the structure will hold only one record. To hold more than one record I will have to use a stru/table. how should I proceed. For example, if my infotyp is IT0812 for KR, and I will have handle the structure HCMT_BSP_PA_KR_R0812 and repetitive structure HCMT_BSP_PA_KR_R0812_LIN_A, ie to read/modify the field from both rep as well as non rep struc.
-- R C Naveen
07-11-2007 12:51 PM
Hi naveen,
1. I am not sure if i understood ur question properly.
2. In infotype 0812, table pa0812, there is only one sequence of repeat structure.
3. U can declare a new structure (if not available),
for the fields
SUB01
OBJ01
NUM01
NAM01
CNT01
AMT01
CUR01
4. Then u can use DO.. VARYING syntax for the same.
regards,
amit m.
07-11-2007 12:51 PM
Hi naveen,
1. I am not sure if i understood ur question properly.
2. In infotype 0812, table pa0812, there is only one sequence of repeat structure.
3. U can declare a new structure (if not available),
for the fields
SUB01
OBJ01
NUM01
NAM01
CNT01
AMT01
CUR01
4. Then u can use DO.. VARYING syntax for the same.
regards,
amit m.
07-12-2007 4:20 AM
Tx Amit,
But there are around 18 sequence like (PS0812)
SUB01, SUB02,....,SUB18
OBJ01,OBJ02,....OBJ18,
.....
.....
Now how can I use only one structure to handle all these.
I am designing front end for the portal, with webdynpro, to read/modify this infotpe. Now I need to create function modules at the backend to read/modify this IT. In the front end the user will enter the data for the repetitve structure. But if I use a single sructure to read the data, only one single record will be read. But the input would be like a table.
So please could you suggest me a method to read the whole table at a time.
07-12-2007 4:27 AM
I guess you can use multiple performs and one form routine :
see the simple example :
PERFORM write_2_server TABLES hire_emp_tab.
PERFORM write_2_server TABLES entrance_tab.
PERFORM write_2_server TABLES integration_tab.
PERFORM write_2_server TABLES duty_tab .
PERFORM write_2_server TABLES type_emp_tab.
PERFORM write_2_server TABLES job_part_tab .
PERFORM write_2_server TABLES free_days_tab.
PERFORM write_2_server TABLES status_tab.
PERFORM write_2_server TABLES bank_detailes_tab.
FORM write_2_server TABLES p_tab_data.
FIELD-SYMBOLS: <wa> TYPE ANY.
" MOVE 'D:_pa_test_mmsk_pa1.txt' TO adress.
OPEN DATASET adress IN TEXT MODE
ENCODING DEFAULT FOR OUTPUT.
IF sy-subrc = 0.
no_file = ' '.
LOOP AT p_tab_data ASSIGNING <wa>.
TRANSFER <wa> TO adress.
ENDLOOP.
CLOSE DATASET adress.
ELSE.
no_file = 'X'.
ENDIF.
endform.
Thanks
Seshu
07-12-2007 4:57 AM
TX Seshu,
But do I have to use FORM-PERFORM statement (subroutine). Cant I do it using any other method???