How to get custom PF status in ALV using cl_salv_table (Using a container)
I created a screen and inside that a container.I tried for an ALV display using CL_SALV_TABLE in the cvontainer. It's working. when I opted for default PF status.It's working. But when I tried for custom PF status using SET_SCREEN_STATUS method, it's throwing some exception. But it's working if I don't use a container .
In both the cases I copied PF status into my program from some standard program.Then added some functionality.
I f you are using Screen and container use CLass:
CL_GUI_ALV_CONTAINER
CL_GUI_ALV_GRID
METHOD-->SET_TABLE_FOR_FIRST_DISPLAY " to display Alv.
Create PF-STATUS in PBO of screen.
[Change standard PF|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/change%252balv%252bstandard%252btoolbar%252band%252brespond%252bit]
EXCLUDE Certain buttons on standard toolbar:
DATA: lt_exclude TYPE ui_functions,
ls_exclude TYPE ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
APPEND ls_exclude TO lt_exclude.
CLEAR ls_exclude.
ls_exclude = cl_gui_alv_grid=>mc_mb_filter.
APPEND ls_exclude TO lt_exclude.
CLEAR ls_exclude.
ls_exclude = cl_gui_alv_grid=>mc_mb_sum.
APPEND ls_exclude TO lt_exclude.
pass lt_exclude to METHOD-->SET_TABLE_FOR_FIRST_DISPLAY
Regards,
Gurpreet
Similar Messages
-
How to get the actual data in ALV report
I am doing some upgradation work in that i am using Submit & And return and also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
With the use of set table for 1st display i got the ALV report but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get the actual data in ALV report, With the use of Any Function Module or with Coding,
with regards,Hi Saravana
I am sure you must be getting the values in tables of table parameters from every FM.
consolidate the values from tables of all FMs in one table and built ALV for that table only.
I hope this way you can show the actual data in ALV.
thanks
Lalit -
How to get Grand Total Text in ALV GRID
Hi Folks,
I am able to get the SUBTOTAL TEXT .....But i need...
How to get Grand Total Text in ALV GRID Display...
Can any one give a Solution for this...Hi Surendar,
Check out this code.. this is showing Total Text in Toal line in the very first column.
REPORT zsales_ord_det_1 .
TABLES: ztable_10.
TYPE-POOLS: slis.
DATA: BEGIN OF it OCCURS 0,
srno(6) type c,
name LIKE ztable_10-name,
age LIKE ztable_10-age,
END OF it.
DATA : BEGIN OF it_temp OCCURS 0,
name LIKE ztable_10-name,
age LIKE ztable_10-age,
END OF it_temp.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: v_repid LIKE sy-repid,
i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
gs_layout TYPE slis_layout_alv,
gd_layout TYPE slis_layout_alv,
i_sort TYPE STANDARD TABLE OF slis_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
START-OF-SELECTION.
v_repid = sy-repid.
SELECT * FROM ztable_10 INTO TABLE it_temp.
LOOP AT it_temp .
it-srno = 'Total'.
it-name = it_temp-name.
it-age = it_temp-age.
APPEND it.
ENDLOOP.
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'IT'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = i_fieldcat[]
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.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'SRNO'.
wa_fieldcat-tabname = it.
append wa_fieldcat to i_fieldcat.
LOOP AT i_fieldcat INTO wa_fieldcat.
IF wa_fieldcat-fieldname = 'AGE'.
wa_fieldcat-do_sum = 'X'.
MODIFY i_fieldcat FROM wa_fieldcat.
ENDIF.
IF wa_fieldcat-fieldname = 'SRNO'.
Hide this field so that it can display it's content i.e.
Total text in Subtotal level
wa_fieldcat-tech = 'X'.
wa_fieldcat-no_out = 'X'.
MODIFY i_fieldcat FROM wa_fieldcat TRANSPORTING tech no_out.
ENDIF.
ENDLOOP.
wa_sort-spos = 1.
wa_sort-fieldname = 'SRNO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort.
gd_layout-no_totalline = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = v_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_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = gd_layout
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = i_sort
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_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
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it
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.
Regards,
Seema -
How to get custom defined messages in WAD
Hi
can you please help me how to get customized error messages in WAD.
While I'm executing in RSRT the customer exit variable throws error message saying that 'No Sales orders exist for this Sold_To Party' but when I execute same query using Bex WAD, then no error message throwing for me for given sold_to party. I tried with all options as given in below code, but WAD gives me system error that "No values found for the customer exit variable 'Zxxxx'. Please help me in this regard. Should I do any settings in WAD to get custom defined messages. Kindly let me know
my code is as below
I_STEP = 2.
CASE i_vnam.
WHEN 'Custome exit variable'.
IF sy-subrc = 0.
ELSE.
MESSAGE e060(/bmc/bw). "No Authorization exist
g_errflag1 = 'X'.
exit.
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
i_class = '/bmc/bw'
i_type = c_e "'E'
i_number = '061'
i_msgv2 = l_msgv2.
RAISE NO_REPLACEMENT.
l_s_range-low = g_soldto.
l_s_range-sign = c_sign_i.
l_s_range-opt = c_range_opt_eq.
APPEND l_s_range TO e_t_range.
ENDIF.
I_STEP = 3.
READ TABLE i_t_var_range INTO w_s_var_range
WITH KEY vnam = 'customer exit variabel'.
IF sy-subrc = 0.
Check the flag and throw message 'No Sales orders'.
IF g_errflag1 = 'X'.
l_msgv1 = 'No Sales orders'.
Call the FM to populate message
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
i_class = c_r9
i_type = c_e "'E'
i_number = c_000
i_msgv1 = l_msgv1
EXCEPTIONS
dummy = 0
OTHERS = 0.
CALL FUNCTION 'RRMS_MESSAGES_SHOW'.
CALL FUNCTION 'RRMS_MESSAGES_DELETE'.
RAISE NO_REPLACEMENT..
ENDIF.
Thanks & Regards
siluHi
Custom Messages WAD -
How to get the total pages in ALV report?
Hi guys,
Since I used page breaks can somebody please help me on how to get the total pages in ALV report?sincerely please...thanks guys.automatic display total page.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
r -
How to get customer number and name from the SD document
Hi All,
Can you please let me know how to get Customer Number and Name from the SD Document?
Thanks a lot....
AnilHi,
It will be displayed in the SD (BIlling document) itself, you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
regards,
radhika
Edited by: kolipara radhika on Jul 10, 2009 5:32 AM -
How to get customer-specific objects into PCUI ?
Hello,
we want to get an Z-table as tab page of the business partner-application into PCUI. It should 'only' be possible to create new entries - today there is no need to modify or delete records.
Does there exist something like a "cookbook" on this task or has anyone of you experience how to get customer-specific objects (without using EEWB) into PCUI ?
Thanks in advance
MartinOption 1:
If you are good in ABAP.
You can add new tab in which create a new Field group. Assign it to a model access clas in which handle the table update.You can get the details in PCUI cookbook itsel.
Option 2:
If you are good at java
Develop an FM to update the table.
Call the FM from webdynpro
Include this webdynpro as HTML viewer in PCUI.
Regards,
Abdul Raheem S -
How to get customer no relating to a Business partner No
How to get customer no relating to a Business partner No . Is that Customer unique ?
hi arshad,
based on business partner u can get customer number. both tables having some uniqe field...based on that uniqe field u can identify business partner no.......
if it is usefull review the points -
Okay i had to install Itunes onto my new OS because window's Vista messed up on me and i can't get any of my old purchases back from my account such as music and movies any ideas on how to get them back (i do not have the folder that contains old items from the last itunes or anything from that OS because it had a virus and i just wanted windows 7)
Downloading past purchases from the App Store, iBookstore, and iTunes Store
Hope this helps,
JD -
How to get a organization name for a particular user using API's
Hi alll,
How to get a organization name for a particular user using API'sYou need to do something like this:
SearchCriteria criteria = new SearchCriteria("User Login", "XELSYSADM", SearchCriteria.Operator.EQUAL);
UserManager usrService = oimClient.getService(UserManager.class);
Set<String> retAttrs = new HashSet<String>();
retAttrs.add(UserManagerConstants.AttributeName.USER_ORGANIZATION.getId());
List<oracle.iam.identity.usermgmt.vo.User> users = usrService.search(criteria, retAttrs, null);
System.out.println("ORG KEY :: " + users.get(0).getAttribute("act_key")); -
How can I make the status bar hide automatically when using safari?
How can I make the status bar hide automatically when using safari?
When Safari is in FullScreen mode, menu bar will be hidden.
Safari window to fit the screen?
Move the mouse pointer to the bottom right corner of the Safari window.
Double arrows will appear. Drag it to resize the window to fit the screen. -
How to get rid of ask toolbar on a mac using chrome browser
how to get rid of ask toolbar on a mac using chrome browser
How to remove Ask toolbar?
You may find this helpful.
http://support.mindspark.com/link/portal/30028/30031/Article/1543/Toolbar-Remova l-Instructions-for-Mac-OSx-Users -
How to How to get FI field status settings for General data
Hello All,
Can you please tell me How can I achieve field status settings for General data.
I have some code to get field status settings for account assignment block but I need General data block data.
Can you please help me with the same.
I got the below code to get field status settings for account assignment block But I need General data block information.
FUNCTION z_fieldstatus_getdetail.
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_BSCHL) TYPE BSCHL
*" VALUE(I_BUKRS) TYPE BUKRS
*" VALUE(I_SAKNR) TYPE SAKNR
*" TABLES
*" T_COBLF STRUCTURE COBLF
*" T_FIELDS STRUCTURE TCOBF OPTIONAL
*" EXCEPTIONS
*" ERROR_MESSAGE
* liefert Feldstatus in Liste t_coblf:
* Feldname (DDIC) nicht in der Liste -> Feld ausgeblendet
* Feldname (DDIC) in der Liste -> Feld eingabebereit
* required = 1:
* Mussfeld;
* required = 0: kein Mussfeld
* active = 0: Feld ausgblendet
* Als Hilfstabelle wird die gesamte Feldliste der Felder (t_fields)
* ausgegeben,
* deren Eingabebereitschaft im Customizing steht
DATA: ls_faus1 LIKE tbsl-faus1.
DATA: ls_faus2 LIKE tbsl-faus2.
* Feldstatus holen
CALL FUNCTION 'FI_FIELD_SELECTION_DETERMINE'
EXPORTING
i_bschl = i_bschl
i_bukrs = i_bukrs
i_saknr = i_saknr
IMPORTING
e_faus1 = ls_faus1
e_faus2 = ls_faus2
EXCEPTIONS
customizing = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE a613(/ssc/comon).
ENDIF.
DATA lv_char.
DATA int_coblf LIKE coblf OCCURS 0 WITH HEADER LINE.
DATA p_cobl LIKE cobl.
DATA: dummy_ktosl LIKE bseg-ktosl.
PERFORM kontierungsblock_ermitteln(sapff001)
TABLES int_coblf
USING lv_char(1)
ls_faus1 ls_faus2 dummy_ktosl.
t_coblf[] = int_coblf[].
SELECT * FROM tcobf INTO TABLE t_fields.
ENDFUNCTION.
Thanks in Adv.
KaustubhHi ,
Looking at the question the first thing that comes to my mind is what is the organization structure that you are following .
As you have mentioned that you have used segment insted of profit center for splitting , what is the scope of profit center in your implementation .
in implementations where locations are devided as profit centes it becomes very necessary to mandatorily split the documents based on profit center .
in your case as you have set it as segment i dont find it an issue of you keeping it as optional as it will not give you and error during your operations , as you have made profit center optional in splitting charcteristics .
hope this suffices .
Regards ,
Dewang -
How to get custom field value in vbkd table using "SD_SALESDOCUMENT_CREATE" bapi
Hi Experts,
Need your help . In one program Iam using SD_SALESDOCUMENT_CREATE bapi .
i/p for my report is am excel.
excel is having below formatt.
To create salesdoc we are using SD_SALESDOC_CREATE bapi.
but After execution of the program we are unable to find the ZZFV_SBCNT (which is custom field) in VBKD w.r.t salesdocument.
Need your help what we need to do to reflect the value in vbkd table.
Here temp will contains the data from excel
1)
FORM f_move_header_data .
wg_header-doc_type = wg_temp-auart . "Order type
wg_header-sales_org = wg_temp-vkorg . "Sales Organization
wg_header-distr_chan = wg_temp-vtweg . "Distribution Channel
wg_header-division = wg_temp-spart. "Division
wg_header-sales_off = wg_temp-vkbur . "Sales Office
wg_header-sales_grp = wg_temp-vkgrp . "Sales Group
wg_header-purch_no_c = wg_temp-bstnk . "Customer purchase order number
wg_header-pymt_meth = wg_temp-zlsch . "Payment Method
wg_header-zzychan_role = wg_temp-zzychan_role_i. "Channel Role
wg_header-zzysub_role = wg_temp-zzysub_role . "Submitter Role
wg_header-zzy_inv_for_opt = wg_temp-zzinv_format . "Invoice Format Optio
wg_header-ord_reason = wg_temp-augru . "Order Reason Code
wg_header-bill_block = wg_temp-faksp. "Billing Block
wg_headerx-doc_type = c_set . "Order type
wg_headerx-sales_org = c_set . "Sales Organization
wg_headerx-distr_chan = c_set . "Distribution Channel
wg_headerx-division = c_set. "Division
wg_headerx-sales_off = c_set . "Sales Office
wg_headerx-sales_grp = c_set . "Sales Group
wg_headerx-purch_no_c = c_set . "Customer purchase order number
wg_headerx-pymt_meth = c_set . "Payment Method
wg_headerx-zzychan_role = c_set. "Channel Role
wg_headerx-zzysub_role = c_set . "Submitter Role
wg_headerx-zzy_inv_for_opt = c_set . "Invoice Format Option
wg_headerx-ord_reason = c_set . "Order Reason Code
wg_headerx-bill_block = c_set. "Billing Block
ENDFORM. " F_MOVE_HEADER_DATA
2)
FORM f_move_item_data .
wg_item-itm_number = g_itmnumber. "Item number
wg_item-material = wg_process-matnr . "Material
wg_item-target_qty = wg_process-target_qty. "Targeted Qty
wg_item-item_categ = wg_process-pstyv. "Sales document item category
wg_item-zzylegal_i = wg_process-zzlegal. "Legal Contract
**********Added this line for vbkd-ZZFV_SBCNT****************************
wg_item-zzfv_sbcnt = wg_process-zzfv_sbcnt.
APPEND wg_item TO i_item.
wg_itemx-material = c_set . "Material
wg_itemx-target_qty = c_set. "Targeted Qty
wg_itemx-item_categ = c_set. "Sales document item category
wg_itemx-zzylegal_i = c_set. "Legal Contract
wg_itemx-zzsteady_date = c_set . "Amortization Start Date
wg_itemx-zzsteady_end_dat = c_set. "Amortization Stop Date
**********Added this line for vbkd-ZZFV_SBCNT****************************
wg_itemx-ZZFV_SBCNt = c_set. "
APPEND wg_itemx TO i_itemx.
CLEAR : wg_itemx.
endform.
3)
FORM f_move_head_ext
wg_extension-structure = c_ext_vbak.
wg_ext_vbak-zzinv_format = wg_temp-zzinv_format.
wg_ext_vbak-zzychan_role = wg_temp-zzychan_role_i.
wg_ext_vbak-zzysub_role = wg_temp-zzysub_role.
wg_extension+30 = wg_ext_vbak.
APPEND wg_extension to i_extension.
CLEAR wg_extension.
wg_extensionx-structure = c_ext_vbakx.
wg_ext_vbakx-zzinv_format = c_set.
wg_ext_vbakx-zzlegal = c_set.
wg_ext_vbakx-zzychan_role = c_set.
wg_ext_vbakx-zzysub_role = c_set.
wg_extensionx+30 = wg_ext_vbakx.
APPEND wg_extensionx TO i_extensionx.
CLEAR wg_extensionx.
ENDFORM. " F_MOVE_HEAD_EXT
*& Form F_MOVE_ITEM_EXT
* Item Extension
4)
FORM f_move_item_ext .
* Structure for BAPI parameter Extension
wg_extension-structure = c_ext_vbap.
wg_ext_vbap-posnr = g_itmnumber.
wg_ext_vbap-zzsteady_date = wg_process-zzsteady_date . "Amortization Start Date
wg_ext_vbap-zzsteady_end_dat = wg_process-zzsteady_end_dat. "Amortization Stop Date
wg_ext_vbap-zzlegal = wg_process-zzlegal. "Legal Contract
wg_extension+30 = wg_ext_vbap.
APPEND wg_extension to i_extension.
* Structure for BAPI parameter Extension - Update Indicator Fields
wg_extensionx-structure = c_ext_vbapx.
wg_ext_vbapx-posnr = g_itmnumber.
wg_ext_vbapx-zzsteady_date = c_set .
wg_ext_vbapx-zzsteady_end_dat = c_set.
* wg_ext_vbapx-zzlegal = c_set.
*wg_process-zzfv_sbcnt = c_set.
wg_extensionx+30 = wg_ext_vbapx.
APPEND wg_extensionx TO i_extensionx.
CLEAR wg_extensionx.
and bapi calling is like below.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = wg_header
sales_header_inx = wg_headerx
logic_switch = wg_logic_switch
business_object = fp_bus_obj
status_buffer_refresh = 'X'
IMPORTING
salesdocument_ex = g_sorder
TABLES
return = i_return
sales_items_in = i_item
sales_items_inx = i_itemx
sales_partners = i_partner
sales_conditions_in = i_cond
sales_conditions_inx = i_condx
sales_text = i_text
extensionin = i_extension
extensionex = i_extensionx.
still we are not getting ZZFV_SBCNT value in VBKD table w.r.t created salesdoc(g_sorder)
Please help me from this issue.
Thank You..Hi,
Please let me know how to add custom fields in the characteristic list, My clients wants department and profit center grouping.
Please tell me how to solve it..
Thanks & Regards,
Reena.. -
How to get the Shipping status of a Invoice items in SAP?
Hi All,
Is there any way to get the Shipping status of a Invoiced Item ?
While i extracting Sales Invoice lines,i can get the shipping method and the shipping date,how can i confirm whether the item is shipped or not?.
Is there any table which contains the shipping status or any column in Invoice lines(INV1) which contains the shipping status?
Please help me to come out from that problem
Thanks
JanakiRamanHello Gilbert,
The column what you specified INV1.TRNSCODE is to know how the shipping was done. My question, Is there any field to specify the material was shipped or not?
Thanks
Janakiraman
Maybe you are looking for
-
Adobe products are not recognized in my Internet Explorer 10 on my Win 7 64B professional
Adobe products are not recognized with my Internet Explorer. I cannot open PDF documents on websites and I cannot play MSN games since Flash Player is not found. I have tried manage add-ons and enable status without success. Can anyone supply detaile
-
Error while calling BAPI_GOODSMVT_CREATE back to back
hi, all i am calling two back to back bapi, BAPI_GOODSMVT_CREATE 1st for movement type 313 and then for 315 for same serial nos (100 in nos.) I have even used bapi_transaction_commit with parameter wait = 'X', after the 1st bapi(313). The first BA
-
Fresh install of iTunes doesn't work(unknown error -50)
I just installed iTunes 7.0.2 via the software update and after the agreeing to the software license agreement this happens: The iTunes application could not be opened. An unknown error occurred(-50) Repairing software permissions didn't solve the pr
-
Leopard Not Seeing Correct Permissions on Files on Leopard Server
File on OS X 10.4 server has the following permissions: owner abc read & write group abc read & write everyone read only If I connect to the server via AFP from a client running OS X 10.4 with user xyz that's in group abc, that client shows these per
-
Xperts, I hv an ALV report program which displays some output. While i am printing it , it prints some fields as blank.. Actual report output mmmmm1 hhhhh1 kkkkk1 mmmmm2 hhhhh2 kkkkk2 mmmmm3 hhhhh3 kkkkk3 Prrinted output mmmmm1 hhhhh1 kkkkk1 mmmmm2 h