Loss or data-ALV
Hi!
Can anyone please help me out as to whats the problem with the report thats causing in loss of records , presently when I combine the two internal tables and try extracting the records its not showing up all the records , its just taking the entries whicg match against the two tables and giving output. Please help me ot please.
Thanks
*& Include ZSD_RENTAL_REPTEST_T01
TABLES: vbak, vbap, wbrk, vbkd, fplt, fpla, zsdsched.
TYPE-POOLS: slis.
DATA: BEGIN OF itab OCCURS 0,
vbeln LIKE vbak-vbeln, "Sales Document
posnr LIKE vbap-posnr, "Item
ernam LIKE vbak-ernam, "Created by
erdat LIKE vbak-erdat, "Created on
audat LIKE vbak-audat, "Document Date
vbtyp LIKE vbak-vbtyp, "SD document category
auart LIKE vbak-auart, "Sales Document type
vkorg LIKE vbak-vkorg, "Sales Org
vtweg LIKE vbak-vtweg, "Distribution Channel
spart LIKE vbak-spart, "Division
vkbur LIKE vbak-vkbur, "Sales Office
guebg LIKE vbak-guebg, "Valid from date
gueen LIKE vbak-gueen, "Valid to date
kunnr LIKE vbak-kunnr, "Sold-to party
kunnrt LIKE kna1-name1, "Sold-to Name
kvgr4 LIKE vbak-kvgr4, "Territory
matnr LIKE vbap-matnr, "Material
arktx LIKE vbap-arktx, "Material Short Text
charg LIKE vbap-charg, "Batch
matkl LIKE vbap-matkl, "Material Group
pstyv LIKE vbap-pstyv, "Item Category
zmeng LIKE vbap-zmeng, "Target Quantity
zieme LIKE vbap-zieme, "Target Unit
kdmat LIKE vbap-kdmat, "Customer Material Number
werks LIKE vbap-werks, "Plant
lgort LIKE vbap-lgort, "Storage Location
vstel LIKE vbap-vstel, "Shipping Point
route LIKE vbap-route, "Route
netpr LIKE vbap-netpr, "Net Price
kpein LIKE vbap-kpein, "Condition Price Unit
kmein LIKE vbap-kmein, "Condition Unit
shkzg LIKE vbap-shkzg, "Returns Item
oidrc LIKE vbap-oidrc, "DRC Code
kunwe LIKE vbap-oid_ship, "Ship-to
kunwet LIKE kna1-name1, "Ship-to Name
zzwprofid LIKE vbap-zzwprofid, "Waste Profile ID
kunre LIKE wbrk-kunre, "Bill-to
kunret LIKE kna1-name1, "Bill-to Name
addl_schd LIKE icon-id, "Push Button For addl line
datab LIKE zsdsched-datab, "Valid-From Date
datbi LIKE zsdsched-datbi, "Valid To Date
zschdfreq LIKE zsdsched-zschdfreq, "Contract schedule frequency
frequency LIKE zsdsched-frequency, "Frequency
monday LIKE zsdsched-monday, "Mondays
tuesday LIKE zsdsched-tuesday, "Tuesdays
wednesday LIKE zsdsched-wednesday, "Wednesdays
thursday LIKE zsdsched-thursday, "Thursdays
friday LIKE zsdsched-friday, "Fridays
saturday LIKE zsdsched-saturday, "Saturdays
sunday LIKE zsdsched-sunday, "Sundays
dzieme LIKE zsdsched-dzieme, "Target quantity UoM
comments LIKE zsdsched-comments, "Comments
fplnr like vbkd-fplnr,
END OF itab.
data: begin of itab1 occurs 0,
fksaf LIKE fplt-fksaf, "Billing Status
afdat LIKE fplt-afdat, "Billing date
fakwr LIKE fplt-fakwr, "Value to be billed
fkdat LIKE fplt-fkdat, "Settelment Date
nfdat LIKE fplt-nfdat, "Settelment Date
fpart LIKE fpla-fpart, "Billing plan type
bedat LIKE fpla-bedat, "Start day for billing
endat LIKE fpla-endat, "End date for billing
horiz LIKE fpla-horiz, "Horizon in billing plan
fplnr LIKE fplt-fplnr,
vbeln LIKE vbak-vbeln,
end of itab1.
data : begin of gt_report occurs 0,
vbeln LIKE vbak-vbeln, "Sales Document
posnr LIKE vbap-posnr, "Item
ernam LIKE vbak-ernam, "Created by
erdat LIKE vbak-erdat, "Created on
audat LIKE vbak-audat, "Document Date
vbtyp LIKE vbak-vbtyp, "SD document category
auart LIKE vbak-auart, "Sales Document type
vkorg LIKE vbak-vkorg, "Sales Org
vtweg LIKE vbak-vtweg, "Distribution Channel
spart LIKE vbak-spart, "Division
vkbur LIKE vbak-vkbur, "Sales Office
guebg LIKE vbak-guebg, "Valid from date
gueen LIKE vbak-gueen, "Valid to date
kunnr LIKE vbak-kunnr, "Sold-to party
kunnrt LIKE kna1-name1, "Sold-to Name
kvgr4 LIKE vbak-kvgr4, "Territory
matnr LIKE vbap-matnr, "Material
arktx LIKE vbap-arktx, "Material Short Text
charg LIKE vbap-charg, "Batch
matkl LIKE vbap-matkl, "Material Group
pstyv LIKE vbap-pstyv, "Item Category
zmeng LIKE vbap-zmeng, "Target Quantity
zieme LIKE vbap-zieme, "Target Unit
kdmat LIKE vbap-kdmat, "Customer Material Number
werks LIKE vbap-werks, "Plant
lgort LIKE vbap-lgort, "Storage Location
vstel LIKE vbap-vstel, "Shipping Point
route LIKE vbap-route, "Route
netpr LIKE vbap-netpr, "Net Price
kpein LIKE vbap-kpein, "Condition Price Unit
kmein LIKE vbap-kmein, "Condition Unit
shkzg LIKE vbap-shkzg, "Returns Item
oidrc LIKE vbap-oidrc, "DRC Code
kunwe LIKE vbap-oid_ship, "Ship-to
aufnr LIKE vbap-aufnr, "Interal Order #
vkaus LIKE vbap-vkaus, "Usage
bezei LIKE tvlvt-bezei, "Usage Description
kunwet LIKE kna1-name1, "Ship-to Name
zzwprofid LIKE vbap-zzwprofid, "Waste Profile ID
kunre LIKE wbrk-kunre, "Bill-to
kunret LIKE kna1-name1, "Bill-to Name
addl_schd LIKE icon-id, "Push Button For addl line
datab LIKE zsdsched-datab, "Valid-From Date
datbi LIKE zsdsched-datbi, "Valid To Date
zschdfreq LIKE zsdsched-zschdfreq, "Contract schedule frequency
frequency LIKE zsdsched-frequency, "Frequency
monday LIKE zsdsched-monday, "Mondays
tuesday LIKE zsdsched-tuesday, "Tuesdays
wednesday LIKE zsdsched-wednesday, "Wednesdays
thursday LIKE zsdsched-thursday, "Thursdays
friday LIKE zsdsched-friday, "Fridays
saturday LIKE zsdsched-saturday, "Saturdays
sunday LIKE zsdsched-sunday, "Sundays
dzieme LIKE zsdsched-dzieme, "Target quantity UoM
comments LIKE zsdsched-comments, "Comments
fksaf LIKE fplt-fksaf, "Billing Status
afdat LIKE fplt-afdat, "Billing date
fakwr LIKE fplt-fakwr, "Value to be billed
fkdat LIKE fplt-fkdat, "Settelment Date
nfdat LIKE fplt-nfdat, "Settelment Date
fpart LIKE fpla-fpart, "Billing plan type
bedat LIKE fpla-bedat, "Start day for billing
endat LIKE fpla-endat, "End date for billing
horiz LIKE fpla-horiz, "Horizon in billing plan
END OF gt_report.
DATA: gs_report LIKE LINE OF gt_report,
gt_sched TYPE TABLE OF zsdsched,
gt_sched_tmp TYPE TABLE OF zsdsched,
gs_sched TYPE zsdsched,
gt_sel LIKE gt_report OCCURS 0,
gt_vbpa TYPE TABLE OF vbpa,
gs_vbpa TYPE vbpa,
gv_auart TYPE auart,
gv_counter TYPE i.
**-- ALV variables
DATA: ls_fieldcat TYPE slis_fieldcat_alv, "Field Catalog list
gt_fieldcat TYPE slis_t_fieldcat_alv, "Field Catalog
ls_sort TYPE slis_sortinfo_alv, "Sorting list
gt_sort TYPE slis_t_sortinfo_alv, "Sort
gs_layout TYPE slis_layout_alv, "List Layout
gs_variant TYPE disvariant, "Display Variant
gv_repid LIKE sy-repid,
gv_save(1) TYPE c,
gv_exit(1) TYPE c.
CONSTANTS: gc_a TYPE c VALUE 'A',
gc_g TYPE c VALUE 'G',
gc_re(2) TYPE c VALUE 'RE'.
* Screen-control Variables
CONTROLS:
tctrl_sched TYPE TABLEVIEW USING SCREEN 1010. " Schedule lines.
*& Report ZSD_RENTAL_REPTEST
REPORT ZSD_RENTAL_REPTEST.
*& Report ZSD_RENTAL_REPTEST
INCLUDE zsd_rental_reptest_t01.
* Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK m1 WITH FRAME TITLE text-t01.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t02.
SELECT-OPTIONS: s_vkorg FOR vbak-vkorg MEMORY ID vko,
s_vtweg FOR vbak-vtweg MEMORY ID vtw,
s_spart FOR vbak-spart MEMORY ID spa,
s_vkbur FOR vbak-vkbur MEMORY ID vkb.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln,
s_erdat FOR vbak-erdat,
s_ernam FOR vbak-ernam,
s_guebg FOR vbak-guebg,
s_gueen FOR vbak-gueen,
s_fplnr for fplt-fplnr,
s_auart FOR gv_auart MEMORY ID vta
MATCHCODE OBJECT h_vakz.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS:
s_kunnr FOR vbak-kunnr,
s_kunwe FOR vbap-oid_ship,
s_kunre FOR wbrk-kunre.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: s_werks FOR vbap-werks MEMORY ID wrk,
s_lgort FOR vbap-lgort MEMORY ID lag,
s_vstel FOR vbap-vstel MEMORY ID vst,
s_route for vbap-route,
s_matnr FOR vbap-matnr.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t04.
PARAMETERS: p_varia TYPE disvariant-variant MEMORY ID wrk,
p_all AS CHECKBOX DEFAULT 'X',
p_group AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF BLOCK m1.
* Start of Selection
START-OF-SELECTION.
PERFORM get_data.
* Display ALV
END-OF-SELECTION.
IF gt_report[] IS INITIAL.
MESSAGE s419(brain).
ELSE.
PERFORM create_alv.
ENDIF.
* AT SELECTION-SCREEN ON VALUE-REQUEST *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varia.
PERFORM f01_f4_variant CHANGING p_varia.
*& Form get_data
* text
FORM get_data .
data: v_tabix type sy-tabix.
* Select the appropriate contract data.
SELECT a~vbeln a~erdat a~ernam a~audat a~vbtyp a~auart a~vkorg
a~vtweg a~spart a~vkbur a~guebg a~gueen a~kunnr a~kvgr4
b~posnr b~matnr b~charg b~matkl b~arktx b~pstyv b~zmeng
b~zieme b~kdmat b~werks b~lgort b~vstel b~netpr b~kpein
b~kmein b~shkzg b~oid_extbol b~oid_miscdl b~oidrc b~oid_ship AS kunwe
b~zzwprofid c~datbi c~datab b~route d~fplnr
INTO CORRESPONDING FIELDS OF TABLE itab
FROM vbak AS a
INNER JOIN vbap AS b ON a~vbeln = b~vbeln
inner join vbkd as d on b~vbeln = d~vbeln
LEFT OUTER JOIN zsdsched AS c ON b~vbeln = c~vbeln AND
b~posnr = c~posnr
WHERE a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~vbtyp = gc_g
AND a~ernam IN s_ernam
AND a~vkorg IN s_vkorg
AND a~vtweg IN s_vtweg
AND a~spart IN s_spart
AND a~vkbur IN s_vkbur
AND a~guebg IN s_guebg
AND a~gueen IN s_gueen
AND a~auart IN s_auart
AND a~kunnr IN s_kunnr
AND b~oid_ship IN s_kunwe
AND b~werks IN s_werks
AND b~lgort IN s_lgort
AND b~vstel IN s_vstel
and b~route in s_route
AND b~matnr IN s_matnr.
SORT itab.
select e~fkdat e~nfdat e~fakwr e~fksaf e~afdat
f~fpart f~bedat f~endat f~horiz g~vbeln
INTO CORRESPONDING FIELDS OF TABLE itab1
FROM fplt AS e
INNER JOIN fpla AS f ON f~fplnr = e~fplnr
inner join vbkd as g on f~fplnr = g~fplnr
where g~vbeln in s_vbeln and
e~fplnr in s_fplnr.
sort itab1.
loop at itab.
read table itab1 with key vbeln = itab-vbeln.
if sy-subrc = 0.
move sy-tabix to v_tabix.
move-corresponding itab to gt_report.
move-corresponding itab1 to gt_report.
append gt_report.
delete itab1 index v_tabix.
endif.
endloop.
loop at itab1.
move-corresponding itab1 to gt_report.
append gt_report.
endloop.
IF NOT itab[] IS INITIAL.
* Get Bill-to Party's for Item Lines
SELECT vbeln posnr parvw kunnr INTO CORRESPONDING FIELDS OF TABLE gt_vbpa
FROM vbpa
FOR ALL ENTRIES IN itab
WHERE vbeln = itab-vbeln
AND parvw = gc_re.
* Select the remaining records from the ZSDSCHED Table.
SELECT * FROM zsdsched
INTO TABLE gt_sched
FOR ALL ENTRIES IN itab
WHERE vbeln = itab-vbeln
AND posnr = itab-posnr.
SORT gt_sched.
ENDIF.
* Loop through captured data for additional information
* LOOP AT itab INTO gs_report.
LOOP AT itab.
* Find the bill-to party
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report-vbeln
posnr = gs_report-posnr
parvw = gc_re.
IF sy-subrc 0.
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report-vbeln
parvw = gc_re.
CHECK sy-subrc = 0 AND gs_vbpa-kunnr IN s_kunre.
ELSE.
CHECK gs_vbpa-kunnr IN s_kunre.
ENDIF.
gs_report-kunre = gs_vbpa-kunnr.
* Get the Customer's Name
gs_report-kunnrt = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunnr ).
gs_report-kunwet = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunwe ).
gs_report-kunret = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunre ).
* Get the scheduling lines for the item line.
CLEAR gv_counter.
IF NOT p_group IS INITIAL.
* If we are grouping the lines add the icon button.
LOOP AT gt_sched INTO gs_sched WHERE vbeln = gs_report-vbeln
AND posnr = gs_report-posnr.
IF gv_counter > 0.
gs_report-addl_schd = '@1E@'.
CONTINUE.
ENDIF.
MOVE-CORRESPONDING gs_sched TO gs_report.
ADD 1 TO gv_counter.
ENDLOOP.
ELSE.
* Otherwise get the rest of the schedule information
READ TABLE gt_sched INTO gs_sched
WITH KEY vbeln = gs_report-vbeln
posnr = gs_report-posnr
datbi = gs_report-datbi
datab = gs_report-datab.
IF sy-subrc = 0.
MOVE-CORRESPONDING gs_sched TO gs_report.
ENDIF.
ENDIF.
APPEND gs_report TO gt_report.
ENDLOOP.
* Remove any duplicates from the reporting table
DELETE ADJACENT DUPLICATES FROM gt_report.
* If Show all records is initial, delete non-scheduled lines (ex. Sub-items)
IF p_all IS INITIAL.
DELETE gt_report WHERE datbi = 0
AND datab = 0.
ENDIF.
ENDFORM. " get_data
*& Form create_alv
* text
FORM create_alv .
PERFORM initialize_fieldcat USING gt_fieldcat[].
PERFORM populate_layout CHANGING gs_layout
gs_variant.
PERFORM populate_sort USING gt_sort[].
PERFORM display_alv_report.
ENDFORM. " create_alv
*& Form initialize_fieldcat
* Get and enhance the field catalog data
* -->L_FIELDCAT[] text
FORM initialize_fieldcat USING l_fieldcat TYPE slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_RENTAL_REPTEST'(002)
i_internal_tabname = 'GT_REPORT'
i_inclname = 'ZSD_RENTAL_REPTEST_T01'(001)
CHANGING
ct_fieldcat = l_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'VBELN'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Contract'.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNNRT'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sold-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNWET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Ship-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNRET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Bill-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'ADDL_SCHD'.
IF NOT p_group IS INITIAL.
ls_fieldcat-seltext_s = 'Schd'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Additional Scheduling Lines'.
ls_fieldcat-icon = 'X'.
CLEAR: ls_fieldcat-key,
ls_fieldcat-ref_fieldname,
ls_fieldcat-ref_tabname,
ls_fieldcat-reptext_ddic,
ls_fieldcat-ddic_outputlen.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ELSE.
DELETE l_fieldcat INDEX sy-tabix.
ENDIF.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'DATAB'.
ls_fieldcat-seltext_s = 'Schd From'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. From Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'DATBI'.
ls_fieldcat-seltext_s = 'Schd To'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. To Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ENDFORM. " initialize_fieldcat
*& Form populate_layout
* text
* <--GS_LAYOUT
* <--GS_VARIANT
FORM populate_layout CHANGING gs_layout TYPE slis_layout_alv
gs_variant TYPE disvariant.
gs_layout-colwidth_optimize = 'X'.
gs_layout-allow_switch_to_list = 'X'.
gs_layout-zebra = 'X'.
gs_variant-report = sy-repid.
ENDFORM. " populate_layout
*& Form populate_sort
* text
* -->l_SORT[] text
FORM populate_sort USING l_sort TYPE slis_t_sortinfo_alv.
ENDFORM. " populate_sort
*& Form display_alv_report
FORM display_alv_report .
gv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
i_callback_program = gv_repid
* I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'gt_report'
is_layout = gs_layout
it_fieldcat = gt_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
it_sort = gt_sort
* IT_FILTER =
* IS_SEL_HIDE =
i_default = 'X'
i_save = gc_a
is_variant = gs_variant
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_report
EXCEPTIONS
program_error = 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.
ENDFORM. " display_alv_report
*& Form f01_f4_variant
* Get the Layout variant for the user.
FORM f01_f4_variant CHANGING c_variant TYPE disvariant-variant.
DATA: ls_variant TYPE disvariant,
l_exit TYPE char1.
ls_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = ls_variant
i_save = 'A'
* it_default_fieldcat =
IMPORTING
e_exit = l_exit
es_variant = ls_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF l_exit EQ space.
c_variant = ls_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " f01_f4_variant
* FORM USER_COMMAND *
* --> R_UCOMM *
* --> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
READ TABLE gt_report INTO gs_report INDEX rs_selfield-tabindex.
CHECK sy-subrc = 0.
CASE rs_selfield-fieldname.
WHEN 'VBELN'.
* Set parameter ID for transaction screen field
CHECK NOT gs_report-vbeln IS INITIAL.
SET PARAMETER ID 'KTN' FIELD gs_report-vbeln.
CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.
WHEN 'ADDL_SCHD'.
CHECK NOT gs_report-addl_schd IS INITIAL.
REFRESH gt_sched_tmp.
LOOP AT gt_sched INTO gs_sched
WHERE vbeln = gs_report-vbeln
AND posnr = gs_report-posnr.
APPEND gs_sched TO gt_sched_tmp.
ENDLOOP.
CHECK sy-subrc = 0.
CALL SCREEN '1010' STARTING AT 5 5.
ENDCASE.
ENDCASE.
ENDFORM. "user_command
*& Module STATUS_1010 OUTPUT
* text
MODULE status_1010 OUTPUT.
SET PF-STATUS 'MAIN_1010'.
SET TITLEBAR '1010' WITH gs_report-vbeln gs_report-posnr.
ENDMODULE. " STATUS_1010 OUTPUT
*& Module USER_COMMAND_1010 INPUT
* text
MODULE user_command_1010 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'CANC'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_1010 INPUT
Hi - in this section --
if sy-subrc = 0.
move sy-tabix to v_tabix.
move-corresponding itab to gt_report.
move-corresponding itab1 to gt_report.
append gt_report.
delete itab1 index v_tabix.
endif.
.. the append to gt_report should not be inside the if
Similar Messages
-
Good day,
I am currently working on a SSIS package that had been built by a previous user. That Package allows me to import data from an excel source to a SQL table. The excel sheet holds multiple columns, However I am having difficulty with one
column when running the package.
The column rows hold a character and an integer (eg: N2). The data types are as follows:
SQL – varchar(3),NULL
SSIS - double-precision float [DT_R8]
I then inserted a data conversion task to change the data type. The task holds the following properties:
Input column – F6
Output Alias – Copy of F6
Data Type – string[DT_STR]
Length – 50
When I execute the package I receive the following error:”
[Excel Source Data [76]] Error: There was an error with output column "F6" (91) on output "Excel Source Output" (85). The column status returned was: "The value could not be converted because
of a potential loss of data.".
I do know that usually the message "The value could not be converted because of a potential loss of data." refers to a data type or length problem.
Further insight to this problem will be much appreciated.Hi Zahid01,
From the error message you post, we can infer the issue is caused by the input column “F6” cannot convert to the output column in Excel Source.
Based on my test, I can reproduce the issue in my environment. The exactly cause is the data type of input column “F6” cannot convert to the data type of corresponding output column. For example, the data type of input column “F6” is [DT_STR], the data type
of corresponding output column is [DT_I4], and there are some nonnumeric values in the input column “F6”. When we execute the task, the error occurs. We can verify the issue in the Advanced Editor dialog box of Excel Source. The following screenshot is for
your reference:
To avoid this issue, please make sure the input column can convert to the output column in Excel Source, including all the values in the input column.
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Operating system causes loss of data during writing to file continuously
Within a while loop I read data from serial port (9,5KByte/sec, bluetooth dongle via serial port protocol) and writes them to a file (text-file) continuously. The operating system interrupts the while loop periodically which causes a loss of data. If I read data from serial port without saving them no data get lost.
E.g. on my PC the OS (W2K) wakes up a second hard disk exactly once per hour which freezes the data saving process to the 'saving' hard disk (and therefore also the while loop, data reading) for about 5-6 sec. On a Laptop the OS (XP, one single hard disk) interrupts the data saving process every 10 minutes for about 1 sec. during the first hour and not any longer afterwards.
I have al
so tried to use the 'deny read/write' option of the 'Open File.vi' to prevent other file sweeping applications (backup, anti-virus, Fast Find) to open the file simultaneously which could temporarily deny you write access to the file - no success.
BTW, this concerns also the compiled version of my LV7.1-program.
Any suggestions?
Thanks,
TobiUse two loops, one for reading the serial data and a separate one for writng to the file. The first loop reads the serial port and writes the data to a queue. The second one reads the queue and writes to the file. Put a delay in each loop, perhaps zero milliseconds in the serial loop and 10 ms in the file loop (try various values). This causes the LV scheduler to share CPU time between the two loops.
Now the serial loop will acquire the data and store it in the queue which also serves as a buffer. If the file loop gets blocked by the OS, the data just stacks up in the queue.
Lynn -
Anybody experienced loss of data when switching service providers?
I recently transferred my two IMAP accounts to a new hosting service, but since I used the same names for the new accounts in Mail, all the mailboxes under the previous accounts, with hundreds of messages dating back to over two years, were deleted or overwritten!
Luckily, because they were IMAP I can still access them through webmail, but users should be warned that re-using the same name for mail accounts when switching causes loss of data, and as far as I know there is no warning during the creation of the new accounts that existing mailboxes will be overwritten.Nothing has been over-written (the messages live on the server): it's simply that you've changed the settings for the accounts to the new provider, so of course Mail is displaying the messages there, not the originals. Just set up the original accounts again with the appropriate server settings and username/password - you can give them new names in Mail to distinguish them from the new ones (you can call a mail account anything you like for display purposes).
-
IBooks will not open with new ipad and upgraded iOS. It only opens briefly to show an empty bookcase. I installed the most recent update of iBooks. In apps store it says 'open'. But the same thing happens...a brief flash. Strangely, the image and list of my collection actually shows in miniature with all the open apps; so I can close it as I do any other app.
I have all my important .pdf reference documents in my library. I am afraid to reinstall the apps risking loss of data. I was never able to figure out how to backup ibooks. Any way to save without access to the program?Now that you have your PDFs on your computer's iTunes library you could try deleting and redownloading the app, and then sync the PDFs back to it - as long as you continue to keep a copy of the PDFs on your computer (and preferably on a backup as well) then if the same thing happens again then you could delete and reinstall again (you shouldn't have any problems with the iBooks app, but then you shouldn't have had a problem this time either).
You could try GoodReader (you could have the most important PDFs in both) - but the current version on iOS 7 isn't getting very good reviews in terms of its speed and crashes (it's description page says that a major update is coming soon). -
device disabled after entering wrong passcode.
Please help me in getting this unlocked without lossing the data as the data is really important for meI think you should call via phone or perhaps take it to a phone store. I suggest taking your id, box packaging and other necessities such as the reciept of the phone being purchased.
Hope this helped -
Using iCloud seems to imply loss of data
I have tried to configure iClous on an iMac (latest OS) and iPhone (ditto). I decided to test with just Address Book and Calendar in case I encountered problems (me, cautious?). It has not yet worked.
I think the problem is I do not want to accept loss of data from my iMac which questions put by iCloud configuration appear to imply.
Questions
1 am I right that I would lose the data
2 is there a way of starting iCloud without that loss
3 why are the configuration questions so oblique
4 how to I undo what I have done so I can go back to synchronising by cable - at least that worked.
This is becoming an embarassment in business.The message you are getting is when signing out of iCloud. It explains that if you don't choose the default to keep contacts on the Mac, then they will be deleted from the Mac. When you log back into iCloud, they will once again be available on the Mac.
When you claim it reverts to an inactive mode and choose to keep the contacts on the Mac, it means you're just not logged into iCloud. All features of iCloud will not be available until you log back in. But your contacts will still be in Address Book if you chose to keep them locally.
Calendars work differently. Once you log into iCloud and check to use calendars in iCloud, they will not be stored locally on the Mac. Once you log out of iCLoud, the calendars in iCal will not be available until you log back in.
Data stored in iCloud works the same as Calendars.
If not logged into iCloud on a computer, all content is still available at the website iCloud.com. -
Every time isync resets causes loss of data
I have two computers. 1 running 10.4.11, 1 runnin 10.5.5
I frequently sync the PB with 10.5.5. However when I sinc my PB running 10.4.11 the message appeared that .mac was reset and I am asked to replace the data on my computer or on .mac
The same will occur tonight, when I go home and will try to sync again the PB running 10.5.5.
In the past these resets have caused me a lot of grief and loss of data, as the two computers have different contacts and bookmarks.
Of course this never occurred when both computers were running 10.4.11
How can I sync both computers without these random "resets"
RegardsIf you're syncing between Macs via .Mac/MobileMe, then you are using *MobileMe Sync*, not iSync.
The *MobileMe Sync* forum is here: http://discussions.apple.com/forum.jspa?forumID=957 -
How can i remove iphone passcode.but i don't want to loss my data.
i have an iphone, how can i remove pascode. but i don't want to loss my data.
you can't
if you could then so could a person who had stolen an ios device -
I am loss may data from mac book air
Hi
I have a MacBook Air
Which has two partitions
1) Mac
2) Boot Camp (Windows 7 32-bit)
I removed the boot camp got careless with Time Machine ,I deleted all data of Windows partitions ,they are very important,What can I do?
I loss may bootcamp partition, Please help me ,If you can guide me step by step, I would be grateful for yourTimeMachine doesn't back up the BootCamp partition. Just the Mac. If you made no backups of your Win7 partition with Win software (or WinClone, a Mac program), you are SOL.
-
Verizon's Liability for Loss of Data and beyond
Recently I had a defective Droid 3 that went haywire and fried the memory card that I had inserted into it, in turn destroying all data, including a presentation that I was delivering to work that day (essentially using the phone as a flash drive). Well since the presentation was destroyed and I had no backup I was let go from my job. Verizon has refused to step up to the plate and offer me any sort of meaningful compensation regarding this and I am curious (aside from hiring a lawyer and filing a small claim) where to go from here. Verizon has shown me that they won't stand behind the equipment that they sell and I am frustrated and angry with the solutions that have been presented to me.
An example of a solution that would satisfy me would be (a 2 parter) 1. Replace the device with the device of MY choice (regardless of price) *DONE* 2. Provide either another line on my account a COMPLIMENTARY upgrade to a device of MY choice or significant monetary adjustment on my account as a credit.
Any thoughts?waffledonkey wrote:
Any thoughts?
Make a backup of mission critical information in multiple formats and locations. This is part of Data Maintenance and Secuirty 101, and anyone who uses computers, especially for high stakes work, should now this.
It IS possible (whether you like it or not) that YOUR memory card also played a part in the failure, so are you also going to demand compensation from the company that made it? Would you think it appropriate to demand compensation from a hard drive manufacturer if it failed and you had not backed up your data on your computer?
Verizon, Motorola (and pretty much every other company that makes tech products), has a Terms and Conditions of use for their products that covers them in situations like this. They provide an explicit warranty to replace the product in case of failure, and they do not take responsbility from data loss or incidental damage to other equipment. It is the consumer's responsibility then to maintain the documentation to use the warranty if they need to, and also to safeguard their data.
Sorry, Verizon is 100% right in only offering you a refurbished replacement for your defective Droid 3 and nothing else. Good luck to you in finding another job. -
Kmail - ispell-trouble - a crash report: NO LOSS OF DATA!
while composing 4 emails, somehow ispell got confused and kmail interface started blinking and destabilizing
a ps -e gave me 4 ispell processes that are defunct
after killing them, kmail stayed the same destabilized and i had to kill it too :-(
ok, after not having any kmail process or ispell process in ps fax, i run kmail again
WOW! :shock: 8) everything back! no loss at all, all my composing emails back and at state i last typed - i'm impressed! (however, ispell didn't load at all any more, but that's no loss, as i quite never listen to its suggestions)
i admit, that the last time i had trouble with kmail it was version 1.2, so long time i had never trouble and the reports of outlook and other client users loosing data scared me having my email client crashed, but this is impressive in my eyes: i sent -KILL to kmail and it still managed to keep all my data
congratulations to Kmail authors! (not for ispell-trouble, but for no data loss)tpowa wrote:have a look at your home directory while composing you will find files called dead.letter that are your emails :twisted:
they are not really dead ;-)
it got repaired itself - no dead.letter's around
what a great software! -
Error -37 when backing up. Continuing will result in loss of data on ipad2.
Error -37 when trying to backup from PC to Ipad2 (or vice versa). Continuing will result in loss of all data on the ipad2.
Disable your security software and try again.
-
Hi,
I have a flat file with this kind of value - " 20140713 " . To take this value in DB Table I set the data type of this column in flat file manager - string [DT_STR] 50, But in destination table It is set as date [date] NULL
while process this file, I'm getting this error, that mention in subject line.
Please confirm, how to do that as I don't want to change the destination column type.you need to add a derived column in SSIS with expressions as below
(DT_DATE)SUBSTRING([Column],1,4) + (DT_WSTR,30) "-" + SUBSTRING([Column],5,2) + (DT_WSTR,30) "-" + SUBSTRING([Column],7,2)
ANd map this new column to your tables date column
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
when at home my phone is connected to my computer network,does that mean no data charged against my monthly allotment now at 2gb
If you are connected to wifi at home or elsewhere you shouldn't be using any of your Verizon cellular data. I say shouldn't because there are a number of posts/threads on this forum where customers are reporting glitches with their iPhones and they indicate they are being charged data when on wifi.
Maybe you are looking for
-
mpeg video file won't open in quick time player on my macbook running snow leopard. works fine on iMac running mountain lion. any ideas?
-
Tracking Down GUI Hooks In Source Code
I'm working on a new project (undocumented code) and have to track down where certain runtime parameters are being changed. The GUI provides a way for the user to set the parameters. I have to track down the GUI code for the popup box where the param
-
Urgent: Want to get the directory listing
Hi, My iAS and iWS reside on separate unix machines. My pdf files being a static content reside on iWS. My application which is deployed on iAS, wants to know the names of the pdf files residing on iWS. Can anyone tell me, as to whether there is any
-
Camera on 4S not working with flash
When I try to take a photo using flash, in a dark area, all I get is a totally grey photo. It seems like the flash and the shutter are not synchronized.
-
hi, I try to add my bibeans report in to my jsp page. I use following code : <%@ taglib uri="http://xmlns.oracle.com/bibeans" prefix="orabi" %> but I recieve the following error: Error(1):"http://xmlns.oracle.com/bibeans" is not registered TLD namesp