Dump in ALV when Difference in Currencies
Dear All,
I am facing a problem with ALV. In my ALV there are some Currency Fields. I am using the fieldcat-cfieldname for
displaying them with correct decimal places. It is working fine if all the row is of the same currency.
If two currencies are coming then it is throwing a dump.
Runtime Errors MOVE_TO_LIT_NOTALLOWED_NODATA
Error at assignment: Overwritten protected field.
Program : SAPLKKBL
Can any one help in solving the issue. Is there any OS Notes available.
Thanks In Advance.
Pradeep Alex Luke.
Dear Deepak,
Thanks for the reply.
I have solved the issue. The problem was that i was not displaying the Currency Field in the out put. it was only in the internal table.
Now i am displaying that and the problem is solved.
Thanks & Regards,
Pradeep Alex Luke.
Similar Messages
-
ABAP Dump is encountered when doing the negative subsequent adjustment
Hi Experts !!!
An ABAP Dump is encountered when doing the negative subsequent adjustment (posting a 102 movt type) on a Purchase Order via the Z function module. The dump only happens if the scenario satisfies the following conditions:
1.Material is either (but may not be limited to) 3000000234, 4000000121, 3000000210 (These are the only reported materials)
2.Order unit in Purchase Order is in MT
3.At 2nd weigh, Net Weight is less than PO Order Qty.
Note: No error occurs if same process is done via MIGO.
Initial Analysis:
An exception/error occurs when calling function u201CMB_CREATE_MATERIAL_DOCUMENT_UTu201D .
Please see below error anlysis report from after executin Zfunction module code.
Error analysis
Short text of error message:
Material 3000000234 / US01 Column 0001: MSEG-BPMNG not in quantity table
/not consistent
Long text of error message:
Diagnosis
Before the system posts a material document for an HPM/TDP material
(MARA-CMETH = 1 or 2), it performs the following consistency
checks:
o For each unit of measure in the Unit of Measure Group
(MARC-UOMGR), a line item has to be present in the additional
quantity appendix table (Table MSEGO2)
o For each unit of measure in the main core table MSEG that is
not initial a line item, has to be present in the additional
quantity appendix table (Table MSEGO2) and the corresponding
packed format quantities have to be identical.
This way, inconsistent stock level updates can be prevented.
System Response
The system stops processing.
Procedure
If the error is reproducible, contact your system administrator.
Procedure for System Administration
The inconsitency can have several reasons, for example:
o Incorrect postings from external systems using function module
MB_CREATE_GOODS_MOVEMENT
o Handling errors
o Application programming errors
Technical information about the message:
Message class....... "O3"
Number.............. 359
Variable 1.......... 3000000234
Variable 2.......... "US01"
Variable 3.......... 0001
Variable 4.......... "BPMNG"
Please let me know,if you want some other details.Problem Issolved
-
GL Balance not showing in F.01,,when choose group currency 30
Hi gurus,
When we run the report : F.01 (Balance Sheet / P&L Statement) with Currency type: 10 (Company Code Currency - INR) report is showing all GL balances.
But if we run the same report: selecting Currency Type 30 (Group Currency-USD) no GL Account balance is not updating in the report F.01.
Can you please let me know what will be the problem ?
Thanks,
SamarHi ,
It is not related to foreign currency gain/loss a/c.My users when he runs Trial Bal through F.01,he use "Currency type 30 and found no GL balance is coming.But when he uses Currency type 10 then all balances are coming.
Kindly advise.
Regards,
Samar -
Safari browser dumps me out when typing on various car forums. This was fine but after version 5 was loaded has been a real PIA. Help!
From the Safari menu bar, select
Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
and confirm. Test. -
We are encounter Short dump in BAPI_INCOMINGINVOICE_PARK when creating inte
Hi experts,
We are encounter Short dump in BAPI_INCOMINGINVOICE_PARK when creating inter-company billing.
Itu2019s working fine when executing from foreground and calling from executable program. Through outbound output type calling from the transaction (VF02 or VF01), encounter short dump. Program terminates in the update task. (Call screen 300) program.
Triggering flow:
VF02 -> output type -> msg type -> zfun..module -> Bapi_incominginvoice_park ->
-> calculate_tax_document(fun.module) u2013> call screen 300 (short dump)
Please let me know if any solution for this issue.
Kind Regards,
ThambieProblem solved :
Trigger flow:
VF02 -> output type -> msg type -> zfun..module -> zfun.module(RFC) start new task-> Bapi_incominginvoice_park -> bapi comit.
Thanks.
Edited by: Thambie on Sep 1, 2010 9:45 AM -
Short dump in alv too many parameters in perform)
I M GETTING PROBLEM IN THIS PROGRAM AGAIN.
Getting short dump too many paramamerets in perform
<CODE>Report Z_50840_ALV
Line-size 80
Line-count 64
Message-id ZZ
No Standard Page Heading.
Copyright statement *
@ copyright 2007 by Intelligroup Inc. *
Program Details *
Program Name: Z_50840_ALV
Date : 19.07.2007
Author : Vasudevaraman V
Description : Test Program
Transport No:
Change Log *
Date :
Author :
Description :
Transport No:
Tables *
Tables: vbrk.
Type Pools *
Type-Pools: SLIS.
Variables *
Data: GV_REPID TYPE SY-REPID.
Structures *
Data: BEGIN OF GIT_VBRK OCCURS 0,
VBELN LIKE VBRK-VBELN, "Billing Document
FKART LIKE VBRK-FKART, "Billing Type
KNUMV LIKE VBRK-KNUMV, "Number of the document condition
BUKRS LIKE VBRK-BUKRS, "Company code
NETWR LIKE VBRK-NETWR, "Net value in document currency
WAERK LIKE VBRK-WAERK, "SD document currency in basic list
END OF GIT_VBRK,
GIT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FCAT TYPE slis_fieldcat_alv,
GIT_EVENTS TYPE SLIS_T_EVENT,
WA_EVENTS TYPE SLIS_ALV_EVENT.
Field Symbols *
Field-symbols: <fs_xxxx>.
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
PARAMETERS: LISTDISP RADIOBUTTON GROUP G1,
GRIDDISP RADIOBUTTON GROUP G1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B1.
Initialization *
Initialization.
GV_REPID = SY-REPID.
At Selection Screen *
At selection-screen.
Start Of Selection *
Start-of-selection.
SET PF-STATUS 'ABC'(001).
PERFORM GET_BILLING_DETAILS.
PERFORM FIELD_CATALOGUE.
PERFORM GET_EVENTS.
End Of Selection *
End-of-selection.
PERFORM DISPLAY_BILLING_DETAILS.
Top Of Page *
Top-of-page.
End Of Page *
End-of-page.
*& Form GET_BILLING_DETAILS
text
--> p1 text
<-- p2 text
FORM GET_BILLING_DETAILS .
SELECT VBELN
FKART
KNUMV
BUKRS
NETWR
WAERK
FROM VBRK
INTO TABLE GIT_VBRK
WHERE VBELN IN S_VBELN.
IF SY-SUBRC = 0.
SORT GIT_VBRK BY VBELN.
ENDIF.
ENDFORM. " GET_BILLING_DETAILS
*& Form FIELD_CATALOGUE
text
--> p1 text
<-- p2 text
FORM FIELD_CATALOGUE .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = GV_REPID
I_INTERNAL_TABNAME = 'GIT_VBRK'
I_STRUCTURE_NAME = I_STRUCTURE_NAME
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = GV_REPID
I_BYPASSING_BUFFER = 'X'
I_BUFFER_ACTIVE = ' '
CHANGING
CT_FIELDCAT = GIT_FCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
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. " FIELD_CATALOGUE
*& Form DISPLAY_BILLING_DETAILS
text
--> p1 text
<-- p2 text
FORM DISPLAY_BILLING_DETAILS .
IF LISTDISP = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = 'X'
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = GV_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = I_STRUCTURE_NAME
IS_LAYOUT = IS_LAYOUT
IT_FIELDCAT = GIT_FCAT
IT_EXCLUDING = IT_EXCLUDING
IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS
IT_SORT = IT_SORT
IT_FILTER = IT_FILTER
IS_SEL_HIDE = IS_SEL_HIDE
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT = IS_VARIANT
IT_EVENTS = GIT_EVENTS
IT_EVENT_EXIT = IT_EVENT_EXIT
IS_PRINT = IS_PRINT
IS_REPREP_ID = IS_REPREP_ID
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER = IR_SALV_LIST_ADAPTER
IT_EXCEPT_QINFO = IT_EXCEPT_QINFO
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER
ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER
TABLES
T_OUTTAB = GIT_VBRK
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.
ELSE.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = 'X'
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = GV_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = I_STRUCTURE_NAME
I_BACKGROUND_ID = ' '
I_GRID_TITLE = I_GRID_TITLE
I_GRID_SETTINGS = I_GRID_SETTINGS
IS_LAYOUT = IS_LAYOUT
IT_FIELDCAT = GIT_FCAT
IT_EXCLUDING = IT_EXCLUDING
IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS
IT_SORT = IT_SORT
IT_FILTER = IT_FILTER
IS_SEL_HIDE = IS_SEL_HIDE
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT = IS_VARIANT
IT_EVENTS = GIT_EVENTS
IT_EVENT_EXIT = IT_EVENT_EXIT
IS_PRINT = IS_PRINT
IS_REPREP_ID = IS_REPREP_ID
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS = IT_ALV_GRAPHICS
IT_HYPERLINK = IT_HYPERLINK
IT_ADD_FIELDCAT = IT_ADD_FIELDCAT
IT_EXCEPT_QINFO = IT_EXCEPT_QINFO
IR_SALV_FULLSCREEN_ADAPTER = IR_SALV_FULLSCREEN_ADAPTER
IMPORTING
E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER
ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER
TABLES
T_OUTTAB = GIT_VBRK
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.
ENDIF.
ENDFORM. " DISPLAY_BILLING_DETAILS
*& Form GET_EVENTS
text
--> p1 text
<-- p2 text
FORM GET_EVENTS .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = GIT_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 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.
LOOP AT GIT_EVENTS INTO WA_EVENTS.
CASE WA_EVENTS-NAME.
WHEN 'USER_COMMAND'.
WA_EVENTS-FORM = 'USER_COMMAND'.
ENDCASE.
MODIFY GIT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
ENDLOOP.
ENDFORM. " GET_EVENTS
FORM USER_COMMAND.
WRITE :/ 'USER_COMMAND'.
ENDFORM.</CODE>.
REGARDS,
SURAJI have run the program in my system and getting the following display instead of dump.
Bill.Doc. BillT Doc.cond. CoCd Net value Curr.
90000763 B2 0000002800 1000 0.00 DEM
90005177 F2 0000012141 1000 5,500.00 DEM
90005178 F2 0000012144 1000 32,838.00 DEM
90005179 F2 0000012146 1000 6,100.00 DEM
90005180 F2 0000012147 1000 6,100.00 DEM
90005182 S1 0000012226 1000 5,500.00 DEM
90005183 S1 0000012227 1000 32,838.00 DEM
90005184 S1 0000012228 1000 6,100.00 DEM
90005185 S1 0000012229 1000 6,100.00 DEM
90005186 F2 0000012230 1000 6,100.00 DEM
90005187 F2 0000012231 1000 6,100.00 DEM
90005188 F2 0000012232 1000 32,778.00 DEM
90005189 F2 0000012233 1000 34,354.00 DEM
90005190 F2 0000012234 1000 19,991.00 DEM
90005191 F2 0000012235 1000 19,719.00 DEM
90005192 F2 0000012236 1000 43,004.00 DEM
90005193 F2 0000012237 1000 9,242.00 DEM
90005194 F2 0000012238 1000 12,156.00 DEM
90005195 F2 0000012239 1000 7,294.00 DEM
90005196 F2 0000012240 1000 9,694.00 DEM
90005197 F2 0000012241 1000 32,838.00 DEM
90005198 F2 0000012242 1000 9,352.00 DEM
90005199 F2 0000012243 1000 13,013.00 DEM -
Hi
I have one Zreport which gives the result in ALV form.
After getting the result(1 row with 33 columns) when I tried to export the ALV results to spread sheet using the option : List-> Export-> Spread Sheet OR by click on Excel icon in the display screen,I'm getting the short dump with the description "No more storage space available for extending an internal table" .
After analysis ,find that dump is raising in the FM : F4_GET_RESULT of Include Program : LSDH3U03.
Can anyone provide us some clue .
Thanks & Regards,
SreeramHi,
If the display is in ALV grid format, then you can try another approach to save the data in a spreadsheet.
- Right-click on any output cell.
- Select 'Spreadsheet' from the drop down list
- radio-button 'All available formats'
- Excel (In existing XXL format)
Thanks!
VS. -
Hello All,
I have created an ALV block list report. The data displayed is from a dynamically created internal table. All works fine and the block list is also appended. But the report dumps in the FM REUSE_ALV_BLOCK_LIST_DISPLAY.
The error given is "Assignment error: Overwriting a protected field." and in the include LKKBLF01. Thie lines of code giving the error is -
011060 if rs_layout-no_hotspot is initial.
011070 format hotspot on.
011080 endif.
011090
011100 concatenate 'RS_HEADER-TEXT' r_col into l_field.
011110 assign (l_field) to <hf>.
> <hf> = l_char.
011130
011140
011150 l_tabname = g_tabname.
011160
Is this something to do with the dynamically created internal table, like the fields being repeated in the table, or the number of fields in the dynamic table exceeding the limit, etc. Also, I get this dump only when there is large amount of data.
Thank you all in advance.
UshaHello Usha,
Did you solve this issue? How did you solved it? I have the same problem, could you please share the information.
Thanks you.
Fabian -
Problem clearing GR/IR when PO in currency different to Company currency
Hi Experts
I have an issue where I have a PO in say USD where group currency for company is Aus Dollar (AUD)
At Month end, for whatever reason there is a GR/IR balance and we maintain it with MR11 but MR11 balances the difference in group currency (AUD) where all other postings for the PO are in USD.
When we run F.13 or F13E the account never clears as it only clears matching transactions of same currency. We seem to never be able to clear the posting created by MR11 (without introducing a large tolerance in F.13 perhaps?)
Any ideas on a way forward?
thanks
ACHi AC,
Eventhough the P.O is in foreign currency, when you select the Only balances in local currency option, system stores the values only in company code currency. So while clearing you'll not face any issue.
If not maintain this indicator, then system stores the values in local currency and that foreign currency also, then while clearing you'll face the problem.
Only balances in local currency setting should activate to GR/IR clearing account
Rgds
Murali. N -
0.01 price difference local currency amount (not due to forex)
Hi All,
I have this strange system behaviour.
In foreign currency, it has no issue. But when see in local currency, it has price difference which is not due to forex.
The exchange rate used is 7.79594
ithe 4 GR lines in foreign currency
14,006.00
9,870.00
14,194.00
3,948.00
where the total foreign amount is 42,018.00
the 4 GR lines in local currency
109,189.98
76,945.96
110,655.62
30,778.38
where the total calculated by system is 327,569.94
BUT, if you calculate yourself, it should be the below where total is 327569.81.
109189.94
76945.93
110655.57
30778.37
Both amount giving the difference of 0.12. (line item of GRC cannot set off due to difference of 0.12. GR 327,569.94 and IR 327,569.82).
Now, during IR, the foreign amount is same which is 42,018.00 and exchagne rate also the same 7.79594 but the GRC amount is credited 327569.82.
But if you see in PO history in me23n, the amount at IR line is 327569.81.
When I see the document in local currency, it throws out credit of 0.01.
My question is,
1) why during GR, the amount calculated manually and system different by 0.12?
2) why during IR, the local amount with addition of 0.01, which is 327569.82 whereas in PO history in me23n, it is showing 327569.81. Why FI document figure and PO history tab IR line different by 0.01?
ThanksHi Calesta,
While the currencies have decimals exceeding 4places, then system would many times dismayed while converting and displaying between the local and the foreign currencies. Pls check if you have defined decimal places for the currencies as per your requirement.
Finally the concern is in the acc doc entries either in MIGO or MIRO. If the difference you are getting is affecting your accounting due to exchange rate differences etc you can configure automatic posting by TE key KDR in OBYC
Regards
Shiva -
Forcing Local Currency amounts when posting Foreign Currency documents
When posting entries in a foreign currency (FC), it is possible and often used to force through a local currency (LC) amount that differs from what SAP would have posted using the current For Ex rate. This is used in cases where a payment is made in FC a couple months later and someone would like to see the LC of the originally posted invoice match the LC of the payment. Although SAP allows you to override the For Ex rate in such a manner, what are the effects of these types of postings? Does the difference ever get recognized, and, if so, where?
Thanks in advance for any explanations.Hi,
Suppose at the time of invoice the exchange rate was 40 and the amount shoule be as below:-
Document currency = 100
Local Currency = 4000
But you have entered the invoice at exchange rate of 45 which was applicable at the payment date
Document currency = 100
Local Currency = 4500
And the payment document line item is posted with the
Document currency = 100
Local Currency = 4500
In this case, system will not do any foreign exchange rate difference provided there is no month end revaluation happening between the invoice posting date and paymentt posting date.
Regards,
Gaurav -
Hello,
I am displaying a ALV report as POP-UP . Its developed based on OOPS ( gr_table->Display).
The ALV displaying the output perfectly when the records are less. For example, the ALV pop-up able to show the 50 records perfectly . If the records are more than 50 (example 500), then i have to scroll down to see the records from 51 to 500. When the records are high , the Alv trying to display the output.. but in a second, its throwing the dump((ASSERTION_FAILED)). Few times, its able to display the data, when i am trying to scroll down to see the below records..its throwing the dump (ASSERTION_FAILED). I tried with all possibilities but no luck. And no idea about ASSERTION FAILED DUMP.
Kindly help.
Regards,
VenkatHello Both,
Thanks for the reply. Please find the error details
The ASSERT condition was violated.
Error analysis
The following checkpoint group was used: "No checkpoint group specified"
If in the ASSERT statement the addition FIELDS was used, you can find
the content of the first 8 specified fields in the following overview:
" (not used) "
" (not used) "
" (not used) "
" (not used) "
" (not used) "
" (not used) "
" (not used) "
" (not used) "
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"ASSERTION_FAILED" " "
"CL_DATAPTABLECACHE============CP" or "CL_DATAPTABLECACHE============CM00P"
"TRANSMIT_PACKET"
Any clue. Please.
Venkat -
Hello Gurus,
In my ZPROGRAM when I am trying to download ALV to local system it is going for short dump with runtime error GETWA_NOT_ASSIGNED.
I am using FM 'REUSE_ALV_FIELDCATALOG_MERGE' for buliding fieldcatalogue.
and FM 'REUSE_ALV_GRID_DISPLAY' for displaying alv.
Please suggest the solution.
Regards,
VijayHi please find the below alv call.
data:G_WA_ZORDERCOST TYPE ZORDERCOST,
G_IT_ZORDERCOST TYPE STANDARD TABLE OF ZORDERCOST,.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = GD_REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGES' "see FORM
I_STRUCTURE_NAME = 'G_WA_ZORDERCOST'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_GRID_TITLE = OUTTEXT
IS_LAYOUT = GD_LAYOUT
IT_FIELDCAT = FIELDCATALOG[]
I_DEFAULT = 'X'
IS_PRINT = GD_PRNTPARAMS
I_SAVE = 'X'
it_special_groups = gd_tabgroup
IT_EVENTS = IT_EVENTS1
is_variant = z_template
TABLES
T_OUTTAB = G_IT_ZORDERCOST[]
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. -
No data in ALV when using MC_STYLE_ENABLED
Hi experts,
I want to display some data in a ALV-Grid control, with just one column which is editable. So the ALV-Grid looks well, when I only display the data. But when I add the attributes for the editable column into my internal table, then I cannot see any data in there. But I can see the rows with the editable column.
Here are the operations:
1) All items of an transparent table is viewed in the ALV-LIST1
2) User can select the specific rows which he/she want to edit.
3) User press a button in the toolbar of ALV-LIST1
4) The ALV-LIST2 comes up with the selected rows and one editabled column, but no data in there...
I already looked in this great example, but I cannot see any special command, posted here:
editing alv output
I also looked in the examples of BCALV_EDIT_0*.
Here is the code:
Definitions:
The method for creating the second ALV-Grid
METHOD create_alv_list2.
DATA: ls_selected_line TYPE lvc_s_row,
lf_row_index TYPE lvc_index,
lt_celltab TYPE lvc_t_styl,
ls_celltab TYPE lvc_s_styl,
l_index TYPE i,
lt_exclude TYPE ui_functions
IF container23 is initial.
CREATE OBJECT container23
EXPORTING container_name = 'LIST_AREA2'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc <> 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = g_repid
txt2 = sy-subrc
txt1 = 'Control element couldn't be created'(510).
ENDIF.
CREATE OBJECT alv_list2
EXPORTING i_parent = container23.
ELSE.
CALL METHOD alv_list2->refresh_table_display.
ENDIF. "IF container23 IS INITIAL.
* Layout
g_lvc_layout-grid_title = 'Edit the rows'.
g_lvc_layout-sel_mode = ' '.
g_lvc_layout-stylefname = 'CELLTAB'.
CLEAR: lt_celltab,
wa_lab_dispo2,
it_lab_dispo2,
wa_lab_dispo3,
it_lab_dispo3
* catch all selected rows from ALV-Grid1
CALL METHOD alv_list1->get_selected_rows
IMPORTING et_index_rows = it_lvc_rows.
* write the lines into the it_lab_dispo3
LOOP AT it_lvc_rows INTO ls_selected_line.
lf_row_index = ls_selected_line-index.
READ TABLE it_lab_dispo INDEX lf_row_index INTO wa_lab_dispo.
wa_lab_dispo3-lab_dispo_struk = wa_lab_dispo.
APPEND wa_lab_dispo3 TO it_lab_dispo3.
ENDLOOP.
CLEAR: wa_lab_dispo3.
* make the cell XBEME editable
LOOP AT it_lab_dispo3 INTO wa_lab_dispo3.
l_index = sy-tabix.
ls_celltab-FIELDNAME = 'XBEME'.
ls_celltab-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
ls_celltab-STYLE2 = SPACE.
ls_celltab-STYLE3 = SPACE.
ls_celltab-STYLE4 = SPACE.
INSERT ls_celltab INTO TABLE lt_celltab.
INSERT LINES OF lt_celltab INTO TABLE wa_lab_dispo3-celltab.
MODIFY it_lab_dispo3 FROM wa_lab_dispo3 INDEX l_index TRANSPORTING celltab.
ENDLOOP.
CALL METHOD alv_list2->set_ready_for_input
EXPORTING i_ready_for_input = 1.
PERFORM exclude_tb_functions CHANGING lt_exclude.
* display the second grid
CALL METHOD alv_list2->set_table_for_first_display
EXPORTING i_structure_name = 'zmm_lab_dispo'
i_save = 'A'
it_toolbar_excluding = lt_exclude
is_layout = g_lvc_layout
CHANGING
it_outtab = it_lab_dispo3[]
CALL METHOD cl_gui_control=>set_focus
EXPORTING control = alv_list2.
CALL METHOD cl_gui_cfw=>flush.
IF sy-subrc <> 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = g_repid
txt2 = sy-subrc
txt1 = 'Error in Flush ALV'(500).
ENDIF.
ENDMETHOD.
<b>If I follow my coding by processing the application, I could see that in the Method "SET_VALUES (CL_ALV_VARIANT)" which was executed by "CALL METHOD alv_list2->set_table_for_first_display" the table "it_outtab" is just filled with the data of my selected rows!
And after this Method their called "FUNCTION K_KKB_PUT_GLOBALS" which has only one command: </b>
create data gs_table_row like es_table_row.
<b>And the gs_table_row has the needed deep-structure.
After it i cannot see any really intressting backend-functions related to my Problem.
</b>
I also try to do something with the fieldcatalog but in this case I only could add columns to the existing table which was editable.
Regards,
SteffenHi Steffen,
Just give the name in capital letters and try:
display the second grid
CALL METHOD alv_list2->set_table_for_first_display
EXPORTING i_structure_name = <b>'ZMM_LAB_DISPO'</b>
i_save = 'A'
it_toolbar_excluding = lt_exclude
is_layout = g_lvc_layout
CHANGING
it_outtab = it_lab_dispo3[]
REgards,
Ravi -
For Refreshing a table display in ALV when data is chngd in maintainance vi
Hi All,
I am displaying the fields of a Ztable in a ALV report. A maintainance view call button is attached to that report through which data of Ztable can be changed.Prolem is that when after changing the data when I return back to report, changes are not reflected.
Kindly suggest to solve this problem.
I am using ALV display through class.
I have already used these functions in the else condition of IF GO_CUSTOM_CONTAINER IS INITIAL.
CALL METHOD go_grid->refresh_table_display.
CALL METHOD cl_gui_cfw=>flush.
For maintainance view I am using the function as
VIEW_MAINTENANCE_CALL on double clicking the maintain button.
Kindly suggest.
Ashutosh KumarAshutosh,
Just calling the REFRESH method will not work. You need to re-fetch the data into the same internal table which you using the displaying the data in the grid.
Probably you can write this data fetching as a subroutine and call this as soon as come back from the Maintenance screen. And updating the internal table, call the REFRESH method.
This should work.
Regards,
Ravi
Note : Please reward points if this helps.
Maybe you are looking for
-
Rental Contract with Periodic Billing Plan
Hello, I need to have a rental contract created, But the payment is one shot. For example, if the customer rents a cylinder for a contract period of 1 year, he pays the contract payment for 1 year in one single shot. So, i need to have the periodic b
-
Hi!! I have problems to print a xy-graph...it gives a error: "append control image to report.vi is not acceptable"...Least if I try to use... I attached a file for my project... Attachments: ThemMonitoringSystemMOD(print).vi 149 KB
-
SafeSleep doesn't work for Mac mini
I use Mac mini (Mid 2011) with hibernatemode=3. But my Mac doesn't reboot from sleepimage afer I unplug the power cord. I mean SafeSleep doesn't work for my Mac. It boots normally but every program is initialized. It is strange that I very rarely w
-
Hi, I installed the SAP convergence on the desktop. Is i have to install any terminal object on my machine? And what would be the Host Address to get this enabled? I'm pretty new to BCM and trying to make this tool work. Thanks Sathish
-
My iPhone is requesting to sync with icloud, but it is using on old ID and password. How do I delete the old ID and password?