Problems when user enter the field
I have problem when user enter the field, but it cannot retrieve from the table. Below is my program, help me to check is it correct or not, THANKS
<input type="text" name="po_num<%=i%>" style="width:100%;text-align:left;" onChnage="chkPOexist(<%=i%>)">
Function chkPOexist(i){
if documen.all.po_num.value == null {
alert ("PO cannot be null");
else {
po_num = new String;
po_num = eval(document.po_num[i].value)
alert(po_num);
<% System.out.println("PP " +po_num);
sql_query = "SELECT po_num"+
" FROM pomast"+
" WHERE po_num '"+po_num+"' ";
try{
rset = db.execSQL(sql_query);
catch(SQLException e) {
System.err.println("Error in query");
while(rset.next()== true){
po_num = rset.getString("po_num");
%>
</select value="<%=po_num%>"><%=po_num%></select>
<%}%>
You seem to have some confusion between java and javascript, and when they run.
Java code runs only on the server, and produces an HTML page.
Javascript code runs on the client.
The two can not communicate. Specific to your example you seem to think that the java code will be executed by your onChange event.
This is not the case.
In order to run java code again you have make a request by submitting the form, or clicking on a link.
Cheers,
evnafets
Similar Messages
-
Problem when user change between fields in ALV
Hi guys.
The problem is: In ALV reports, EDIT mode, when I change between fields, the new field gets selected (the data get selected in blue or gry color), so I can write over new values. The problem is that some users when try to change to another field, the new field doesnt get selected, so he needs to select all the value and then write the new values. Is it clear?
I checked with the user in another PC using his user in SAP and when she changes to another field, the new field gets selected. Then I checked in her PC doing the same, and when I moved to another field, the new field doesnt get selected, so i need to select myself and then write.
In my PC I can change fields, tabbing, and the new fields get select, but in her PC i can't do that.
Is it a problem of windows? or SAP logon?
Does anybody know about this issue?
Regards
Miguel
Edited by: Miguel Alvear on Oct 5, 2011 10:15 PMI would have checked her GUI version. Maybe she has another version than you !!
-
When pressing enter the values are converted to upper case in module pool
hi
tehre are three fields for maintanece in module pool
wheni press enter the fields are converted to upper case i want to avoid this as i dont want to have the upper case
i need to save in table as waht user has inputed not in upper case
so i dont want the fields to be automatically converted to upper case whne pressing enter on screen
regards
Nishanthi Nishant ,
<b>The solution to ur problem is breifly explained with a sample module pool program .</b>check it below :
IN the TOP INCLUDE**********************
DATA :
wempid TYPE z7684dp-empid , " same name as in the screen declaration
wname TYPE z7684dp-name,
wacc TYPE z7684dp-account,
wdesg TYPE z7684dp-designation,
ok_code TYPE sy-ucomm ,
wa_z7684dp TYPE z7684dp,
t_z7684dp TYPE STANDARD TABLE OF z7684dp,
*****IN THE PAI OF THE SCREEN 100(for example)***********
MODULE user_command_0100 INPUT.
CASE ok_code .
WHEN 'CRE' . " function code for the pushbotton to insert the values
TRANSLATE wdesg TO LOWER CASE.
TRANSLATE wempid TO LOWER CASE.
TRANSLATE wname TO LOWER CASE.
TRANSLATE wacc TO LOWER CASE.
wa_z7684dp-empid = wempid .
wa_z7684dp-name = wname .
wa_z7684dp-account = wacc .
wa_z7684dp-designation = wdesg .
INSERT INTO z7684dp VALUES wa_z7684dp .
IF sy-subrc EQ 0 .
MESSAGE 'SUCCESSFUL INSERTION TO TABLE' TYPE 'I' .
ELSE .
MESSAGE 'UNSUCCESSFUL INSERTION TO TABLE' TYPE 'I' .
ENDIF.
CLEAR: wa_z7684dp , wempid , wname , wacc , wdesg.
REVERT BACK WITH ANY FURTHUR QUERIES
<b>DO REWARD WITRH POINTS IF USEFUL :)</b> -
A word document was emailed to me. I can open the document without a problem on my iPad 2. Is there a way for me to type on the document.... to fill out the form? When I click the fields, the virtual keyboard does not appear.
If you want to edit a word document then you will need an app on your iPad that supports word so that you can copy them to it via 'open in' e.g. Apple's Pages app or a third-party app such as Documents To Go or QuickOffice HD
-
Add days to the dates when user enter +
hello ,
i have requirement that when user enter + 30 in date field he got + 30 dayas of current date is thr any why to do this it is modulpool and i have taken date field on screen.here is sample code to show next and previous month on button click and show current month
and year default.
REPORT ztn_datechk_button.
TABLES sscrfields.
TYPE-POOLS icon.
DATA month TYPE i.
PARAMETERS: date TYPE spmon .
INITIALIZATION.
date = sy-datum+0(6) .
"date = sy-datum+0(2) - 1.
IF date+4(2) < 1 ."or date+4(2) > 12.
date+4(2) = 12.
date+0(4) = date+0(4) - 1.
ELSEIF date+4(2) > 12 ."or date+4(2) > 12.
date+4(2) = 1.
date+0(4) = date+0(4) + 1.
ENDIF.
SELECTION-SCREEN PUSHBUTTON 50(15) but1 USER-COMMAND prev VISIBLE LENGTH 3.
SELECTION-SCREEN PUSHBUTTON 53(15) but2 USER-COMMAND next VISIBLE LENGTH 3.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_previous_value
info = 'PREVIOUS' "text = 'Button 2'
IMPORTING
RESULT = but1
EXCEPTIONS
OTHERS = 0.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_next_value
info = '' "text = 'Button 2'
add_stdinf = ''
IMPORTING
RESULT = but2
EXCEPTIONS
OTHERS = 0.
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'PREV'.
date = date+0(6) - 1.
IF date+4(2) < 1 ."or date+4(2) > 12.
date+4(2) = 12.
date+0(4) = date+0(4) - 1.
ENDIF.
WHEN 'NEXT'.
date = date+0(6) + 1.
IF date+4(2) > 12 ."or date+4(2) > 12.
date+4(2) = 1.
date+0(4) = date+0(4) + 1.
ENDIF.
ENDCASE.
IF date+4(2) < 1 OR date+4(2) > 12.
MESSAGE 'Invalid Month' TYPE 'E'.
ENDIF. -
When I enter the Quick time 7 to register the pro version all it does is cycle back to the name field. I have check the info that I entered and it seems correct. How do I register?
Enter in the name, exactly as in the email Apple sent you, and the key, and then press the Tab key. Do not press the Enter/Return key.
Hope this helps. -
How to raise popup when we enter the data on Partcular field
Hi All,
I have an issue in Sales Order in WEBUI, In the Sales Order when we enter the Customer Request Delivery Date field the popup sholu come,If any body have please do the need full for me.
Component: BT115H_SLSO
Regards,
Shanmukesh P[http://www.orafaq.com/forum/t/78289/2/|http://www.orafaq.com/forum/t/78289/2/]
-
I have a problem with the pop-up prompt to enter my serial number for installation, it won't pop up when I entered the redemption code. Can someone help?
There is no pop up. There is a window that is part of the installation process. If you entered a wrong number, like a redemption code, you would have wound up installing it as a trial. In that case, go to the Help menu in the editor and look for an option there.
If that isn't what you're talking about, you really need to explain in more detail. -
Music purchased on ipad wont play on computer. I get a message which says that the computer is not authorised to play the track but when I enter the password I get the message saying that the computer is already authorised. I have the opposite problem transfering some but not all music from computer to ipad. Can anyone help?
Interesting. Maybe it is more of a DRM issue than an Apple ID ownership issue. There is actually an iTunes Support section here on the discussion boards. If you wish to continue troubleshooting, you might post your question over there and refer to this discussion thread. You can also contact someone in Apple iTunes Support.
-
I can't unlock the screen to access my macbook pro. When I enter the password it just jiggles. I'm not getting an error message, so I'm pretty certain that the password is correct. Any suggestions?
I already checked that one.
I'm baffled, especially since it will usually give you the Invalid user name or password entered message. I'm not getting that. Instead the password field just jiggles back and forth. Very odd. -
HI Team,
In ibase component when user change the serial number we need to set date time in Extra attribute filed..if we click edit ,User change serial number after save we need to set date time in Extra Attribute 4 field .
Component - PRDGENSET
In this component there is no attributes,so where we need to implement and how to implement please help.
Thanks
kalpanaHi Abi,
Thanks for your reply..see i debugged..i have put break point in method SET_S_STRUCT method if press enter in serial number ,debuggeris triggered..in SET_S_STRUCT method value getting serial number..so how to write the logic here...
In GET_S_STRUCT method iam getting all attributes but serial number is not filled..So could you please help here what to do..
in set_S_STRCUT method value iam gettin serial number...in collection wrapper iam geting zrealtions if i open attributes_ref -if i pass Attribute value in run time its getting displayed.so how to write the logic based on serial number please help some coding.
Thanks
kalpana -
How to populate date & time when user enter data for custom table in sm30
Can anyone tell me How to populate system date & time when user enter data for custom table in sm30..
Req is
i have custom table and using sm30 user can enter data.
after saving date i want to update date & time in table
Pls let me know where to write the code?
Thanks in AdvanceYou have to write the code in EVENT 01 in SE54 transaction. Go to SE54, enter your Ztable name and in the menu 'Environment-->Events'. Press 'ENTER' to go past the popup message. In the next screen, click on 'New Entries'. In the first column, enter 01 and in the next column give some name for your routine(say UPDATE_USER_DATE_TIME). Then click on the souce code icon that appears in blue at the end of the row. In the code, you need logic like below.
FORM update_user_date_time.
DATA: f_index LIKE sy-tabix.
DATA: BEGIN OF l_total.
INCLUDE STRUCTURE zztable.
INCLUDE STRUCTURE vimtbflags.
DATA END OF l_total.
DATA: s_record TYPE zztable.
LOOP AT total INTO l_total.
IF l_total-vim_action = aendern OR
l_total-vim_action = neuer_eintrag.
MOVE-CORRESPONDING l_total TO s_record.
s_record-zz_user = sy-uname.
s_record-zz_date = sy-datum.
s_record-zz_time = sy-uzeit.
READ TABLE extract WITH KEY l_total.
IF sy-subrc EQ 0.
f_index = sy-tabix.
ELSE.
CLEAR f_index.
ENDIF.
MOVE-CORRESPONDING s_record TO l_total.
MODIFY total FROM l_total.
CHECK f_index GT 0.
MODIFY extract INDEX f_index FROM l_total.
ENDIF.
ENDLOOP.
ENDFORM. " UPDATE_USER_DATE_TIME
Here ZZTABLE is the Z table and ZZ_USER, ZZ_DATE, and ZZ_TIME are the fields that are updated. -
How to catch filenotfoundexception when user enters a bogus page
How to catch when user enters a bogus jsp page. I have login.jsp. If someon enter log.jsp i get javax.servlet.ServletException: java.io.FileNotFoundException and then the whole path is shown. This onlyhappens with 9ias. When i was using http server that came with 9i database, i was able to catch this with send_error=true in zone.properties. It doesnt work with 9ias. How is everyone catching these errors? I cant seem to find out how to do it.
ThanksHi Adam,
I am also facing the same problem of the java.io.FIleNotFOundException in the browser display when i am giving a wrong file path in the Url. you have mentioned that you have solved it when you were using Orcale 8i Http Server, can you please guide me for that( as we are also using Oracle 8i) I checked with putting send_error=true in zone.properties file but that is not working. What exctly you have done to get rid of that error message. I am using Windows Nt platform.
Thanks and Regards.
Arnab -
When clic in the field "i_ekpo-ebeln" tab exit in report ALV
Good Afternoon! *********************************************************
Coloquei all the code, I believe for better clarification. When clico in the field i_ekpo-ebeln in the report is called transaction ME23 c/o GRID this functioning normally, but with the reports List and Hierarquico it does not happen the same and it prints in the baseboard the message "Invalid Function". when standard use buttons, functions of course.
obs.: I had that to create a SET Pf-status for each type of report pos I wanted that when clicar in the field box and clicar in the button "TO PRINT REPORT" it printed sapscript. How I make to solve such problem?
Att, Carlos Eduardo.
REPORT ztreino NO STANDARD PAGE HEADING LINE-SIZE 220.
************************declarações*********************
DATA: BEGIN OF y_ekko OCCURS 0,
ebeln TYPE ekko-ebeln, "Nº documento de compra
bukrs TYPE ekko-bukrs, "Empresa
bsart TYPE ekko-bsart, "Documento de compra
loekz TYPE ekko-loekz, "Código de eliminação
aedat TYPE ekko-aedat, "Data de criação do registro
ernam TYPE ekko-ernam, "Nome do responsável que criou o objeto
lifnr TYPE ekko-lifnr, "Nº conta do fornecedor
ekgrp TYPE ekko-ekgrp, "Grupo de compradores
waers TYPE ekko-waers, "Chave da moeda
BOX TYPE ptrv_approval-box, "campo para chekinbox
END OF y_ekko,
BEGIN OF y_ekpo OCCURS 0,
ebeln TYPE ekpo-ebeln, "Nº documento de compra
ebelp TYPE ekpo-ebelp, "Nº item do documento de compra
loekz TYPE ekpo-loekz, "Código de eliminação
txz01 TYPE ekpo-txz01, "Texto breve
matnr TYPE ekpo-matnr, "Nº material
bukrs TYPE ekpo-bukrs, "Empresa
werks TYPE ekpo-werks, "Centro
menge TYPE ekpo-menge, "Quantidade do pedido
netpr TYPE ekpo-netpr, "Preço líquido no documento de compra
BOX TYPE ptrv_approval-box, "campo para chekinbox
END OF y_ekpo.
*início seleção de dados
SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
*Nº documento de compra
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln NO INTERVALS OBLIGATORY,
s_bukrs FOR ekko-bukrs OBLIGATORY, "Empresa
s_bsart FOR ekko-bsart. "Documento de compra
SELECTION-SCREEN END OF BLOCK bl1.
SELECTION-SCREEN END OF BLOCK bl2.
**fim da seleção de dados----
**início da variante
SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-002.
PARAMETERS : p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK bl3.
SELECTION-SCREEN END OF BLOCK bl4.
***fim variante -
***início modo relatório
SELECTION-SCREEN BEGIN OF BLOCK bl5 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl6 WITH FRAME TITLE text-003.
SELECTION-SCREEN SKIP.
PARAMETERS : rb1 RADIOBUTTON GROUP TIPO DEFAULT 'X',
rb2 RADIOBUTTON GROUP TIPO,
rb3 RADIOBUTTON GROUP TIPO.
SELECTION-SCREEN END OF BLOCK bl6.
SELECTION-SCREEN END OF BLOCK bl5.
****fim modo relatório
*******início da opção de download
Dados do arquivo texto de saída.
SELECTION-SCREEN BEGIN OF BLOCK bl9 WITH FRAME TITLE text-004.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-005.
PARAMETERS: p_gerar AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-006.
PARAMETERS: p_dir LIKE rlgrap-filename DEFAULT 'c:'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-007.
PARAMETERS: p_arq LIKE rlgrap-filename DEFAULT 'nota-geral.txt'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK bl9.
DATA :
i_ekko LIKE y_ekko OCCURS 0 WITH HEADER LINE,
i_ekpo LIKE y_ekpo OCCURS 0 WITH HEADER LINE.
i_tabsaida LIKE y_saida OCCURS 0 WITH HEADER LINE.
*********************Fim Declarações*******************************
*********************Declarações ALV*******************************
TYPE-POOLS : slis.
DATA :
s_layout TYPE slis_layout_alv,
t_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
t_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
s_grupos TYPE slis_t_sp_group_alv WITH HEADER LINE,
s_keyinfo TYPE slis_keyinfo_alv,
extab TYPE slis_t_extab.
DATA :
variant_exit(1) TYPE c,
def_variant(1) TYPE c,
s_print TYPE slis_print_alv,
s_top TYPE slis_t_listheader,
variante TYPE disvariant,
def_variante TYPE disvariant,
v_repid LIKE sy-repid,
*------pega a data que esta rodando a transação
v_datasaida(10) TYPE C,
*------para saber quantos Pedidos na EKKO
v_exibe TYPE I,
s_selfield type slis_selfield,
v_ucomm like sy-ucomm.
**********************Fim declarações ALV*************************
Contants para Sapscript e declarações *
TABLES: ITCPO.
CONSTANTS: c_on(1) TYPE C VALUE 'X', "Parâmetro para o Sapscript
c_off(1) TYPE C VALUE ''. "Parâmetro para o Sapscript
Data:
v_element(15) TYPE C, "Elemento de texto do Sap Script
v_type(15) TYPE C, "BODY
v_window(15) TYPE C, "Janela
flag TYPE I, "Uma condição para impressão do sapscript
resp TYPE C, "resposta para confirmação do download tab
zlen TYPE I, "Para verificar o um diretório válido
Para a função WS_DOWNLOAD só em declarar as variaveis deste tipo já *
seria o bastante para passar o caminho para a função
TABLES : ekko, ekpo.
initialization *
INITIALIZATION.
PERFORM zf_verifica_variante.
at selection-screen on value-request *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM zf_busca_variante_existente.
at seletion-screen *
AT SELECTION-SCREEN.
PERFORM zf_valida_variante.
validar os campo antes de fazer download do arquivo
PERFORM zf_trata_parametros_gerar_arqu.
start-of-selection *
START-OF-SELECTION.
PERFORM zf_seleciona_dados.
Criando ALV *
PERFORM zf_alv.
*& Form zf_verifica_variante
text
--> Verifica se a variante selecionada é existente
FORM zf_verifica_variante.
CLEAR variante.
v_repid = sy-repid.
variante-report = v_repid.
Buscar variante default
def_variante = variante.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = def_variante
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc EQ 0.
p_vari = def_variante-variant.
ENDIF.
ENDFORM. " zf_verifica_variante
*& Form zf_busca_variante_existente
*- text
*- --> Vai buscar a variante existente
FORM zf_busca_variante_existente.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = variante " Report com as
i_save = 'A' " Variantes Salvas
i_tabname_header = 'I_EKPO' " Tabela interna saida
it_default_fieldcat = t_fieldcat[] " Tabela de formatação
i_display_via_grid = 'X' " Dispara POPUP em ALV
IMPORTING
e_exit = variant_exit " Se não existir variante X
es_variant = def_variante " Variante default
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF variant_exit = space.
p_vari = def_variante-variant. " Recebe variante escolhida
ENDIF.
ENDIF.
ENDFORM. " zf_busca_variante_existente
*-& Form zf_valida_variante
*- text
*- --> Verifica se a variante digitada é válida.
FORM zf_valida_variante.
IF NOT p_vari IS INITIAL.
variante = def_variante. "nome do report
def_variante-variant = p_vari. "nome que foi digitado
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = def_variante
variante = def_variante.
ELSE.
clear variante.
variante-report = v_repid.
ENDIF.
ENDFORM. " zf_valida_variante
-& Form zf_seleciona_dados
*- text
--> Seleciona os dados da ekko e ekpo
FORM zf_seleciona_dados.
SELECT ebeln
bukrs
bsart
loekz
aedat
ernam
lifnr
ekgrp
waers
FROM ekko
INTO TABLE i_ekko
WHERE
( ebeln IN s_ebeln AND
bsart EQ 'NB' ).
SORT I_EKKO ASCENDING.
IF sy-subrc EQ 0.
SELECT ebeln
ebelp
loekz
txz01
matnr
bukrs
werks
menge
netpr
FROM ekpo
INTO TABLE i_ekpo
FOR ALL ENTRIES IN i_ekko
WHERE
( ebeln EQ i_ekko-ebeln ).
ENDIF.
SORT I_EKPO ASCENDING.
Para exibir no topo do relatório no grid
DESCRIBE TABLE I_EKKO LINES v_exibe.
ENDFORM. " zf_seleciona_dados
*-& Form zf_ALV
*- text
--> Opções de alv
FORM zf_alv.
IF rb1 = 'X'.
PERFORM zf_gri.
ENDIF.
IF rb2 = 'X'.
PERFORM ZF_HIERARQUICO.
ENDIF.
IF rb3 = 'X'.
PERFORM ZF_LIST.
ENDIF.
ENDFORM. " zf_ALV
*& Form zf_gri
*- text
*- --> Seqüência para gerar o alv grid
FORM zf_gri.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
PERFORM zf_top USING s_top.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
ENDFORM. " zf_gri
*-& Form zf_layout
*- text
--> cria o layout do alv
FORM zf_layout.
s_layout-box_tabname = 'I_EKPO'.
s_layout-box_fieldname = 'BOX'.
s_layout-get_selinfos = 'X'.
s_layout-detail_popup = 'X'.
s_layout-detail_initial_lines = 'X'.
s_layout-zebra = 'X'.
s_layout-colwidth_optimize = 'X'.
ENDFORM. " zf_layout
*-& Form zf_ordena_campos
*- text
--> Ordenação dos campos
FORM zf_ordena_campos.
CLEAR t_sort.
t_sort-spos = '1'. "prioridade de ordenação
t_sort-fieldname = 'EBELN'. "campo da tab int. de saida
t_sort-tabname = 'I_EKPO'. "tab inter de saida
t_sort-up = 'X'. "ordenação do maior para o menor
APPEND t_sort.
ENDFORM. " zf_ordena_campos
*-& Form zf_monta_campos_alv
text
--> è passado os campos de acordo com a ordem de exibição inicial
FORM zf_monta_campos_alv.
IF rb2 = 'X'.
CLEAR t_FIELDCAT.
t_FIELDCAT-FIELDNAME = 'BOX'.
t_FIELDCAT-TABNAME = 'I_EKKO'.
t_FIELDCAT-CHECKBOX = 'X'.
t_FIELDCAT-INPUT = 'X'.
APPEND t_FIELDCAT.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EBELN'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'EBELN'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'BUKRS'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'BUKRS'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'BSART'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'BSART'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'AEDAT'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'AEDAT'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'ERNAM'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'ERNAM'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'LIFNR'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'LIFNR'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EKGRP'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'EKGRP'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
ENDIF.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EBELN'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'EBELN'.
t_fieldcat-ref_tabname = 'EKPO'.
t_fieldcat-key = 'X'.
t_fieldcat-Hotspot = 'X'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
T_fieldcat-fieldname = 'EBELP'.
T_fieldcat-tabname = 'I_EKPO'.
T_fieldcat-ref_fieldname = 'EBELP'.
T_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'MATNR'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'MATNR'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'WERKS'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'WERKS'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'MENGE'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'MENGE'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'NETPR'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'NETPR'.
t_fieldcat-ref_tabname = 'EKPO'.
t_fieldcat-do_sum = 'X'. "totalizar campo
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'TXZ01'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'TXZ01'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
ENDFORM. " zf_monta_campos_alv
*-& Form zf_top
*- text
*- --> Cria o texto de cabeçalho do ALV, passando por parametro o
--> p_S_TOP para s_top
FORM zf_top USING p_s_top TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = 'Relatório de Compras por Classificação Contábil'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Parametros Seleção '.
ls_line-info = '- Documento de compra'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = '- Empresa'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = '- Tip.doc.compra'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Total Pedido'.
ls_line-info = v_exibe.
APPEND ls_line TO p_s_top.
início Formatar a data
CALL FUNCTION 'DATUMSAUFBEREITUNG'
EXPORTING
IDATE = SY-DATUM
IMPORTING
TDAT8 = v_datasaida.
Fim Formatar a data
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Data da execução'.
ls_line-info = v_datasaida.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Usuário'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'A'.
ls_line-info = sy-uname.
APPEND ls_line TO p_s_top.
ENDFORM. " zf_top
*-& Form zf_print
*- text
*- --> Parametros de Impressão para o ALV
FORM zf_print.
s_print-no_print_selinfos = 'N'.
s_print-no_print_listinfos = 'N'.
ENDFORM. " zf_print
*-& Form zf_imprime_alv
*- text
*- --> Imprime o ALV c/ seu parametros
FORM zf_imprime_alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PF_STATUS_SET = 'ZSET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
i_callback_program = v_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = s_layout
it_fieldcat = t_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = S_GRUPOS[]
it_sort = t_sort[]
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
is_variant = variante
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT = S_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_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = I_EKPO
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. " zf_imprime_alv
*-& Form zf_top-of-page
*- text
--> Cabeçalho ALV
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = s_top
i_logo = 'CARLOS_LOGO3'.
I_END_OF_LIST_GRID = .
ENDFORM. " zf_top-of-page
*-& Form ZF_HIERARQUICO
*- text
*- --> RELATÓRIO HIERÁQUICO
form ZF_HIERARQUICO.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_hierarquico_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
endform. " ZF_HIERARQUICO
*-& Form zf_grupo
text
--> Não é fundamental a criação de grupos de campos, mas facilita
ao usuário na hora de escolher os campos de exibição após o clique do
botão MODIFICAR LAYOUT . Vários campos da fieldcat podem ser
definidos para um mesmo grupo de campo.
form zf_grupo.
MOVE:'Moeda' TO S_GRUPOS-SP_GROUP,
'Campos moeda' TO S_GRUPOS-TEXT.
APPEND S_GRUPOS.
endform. " zf_grupo
*& Form zf_imprime_hierarquico_alv
text
--> p1 text
<-- p2 text
form zf_imprime_hierarquico_alv.
Vamos definir as ligações entre as tabelas para as quebras no momento
da impressão.
s_keyinfo-header01 = 'EBELN'.
s_keyinfo-item01 = 'EBELN'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
I_CALLBACK_PF_STATUS_SET = 'ZF_SET_PF_STATUS_HIERARQ'
I_CALLBACK_PROGRAM = v_repid
IS_LAYOUT = S_LAYOUT
IT_FIELDCAT = T_FIELDCAT[]
IT_SPECIAL_GROUPS = S_GRUPOS[]
IT_SORT =
IT_FILTER =
- Parâmetro p/executar sempre com a variante default
I_DEFAULT = 'X'
- Se é possível salvar as variantes
I_SAVE = 'A'
- Nome da variante selecionada
IS_VARIANT = VARIANTE
IT_EVENTS =
IT_EVENT_EXIT =
i_tabname_header = 'I_EKKO'
i_tabname_item = 'I_EKPO'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = S_KEYINFO
IS_PRINT = S_PRINT
IS_REPREP_ID =
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = I_EKKO
t_outtab_item = I_EKPO.
endform. " zf_imprime_hierarquico_alv
*& Form ZF_LIST
text
--> p1 text
<-- p2 text
form ZF_LIST.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_list_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
endform. " ZF_LIST
*& Form zf_imprime_list_alv
text
--> p1 text
<-- p2 text
form zf_imprime_list_alv.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PF_STATUS_SET = 'ZF_SET_PF_STATUS_LIST'
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_STRUCTURE_NAME = 'I_EKPO'
IS_LAYOUT = S_LAYOUT
IT_FIELDCAT = T_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = S_GRUPOS[]
IT_SORT = T_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT = VARIANTE
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT = S_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 = I_EKPO.
endform. " zf_imprime_list_alv
*& Form zf_user_command
text
--> p1 text
<-- p2 text
form zf_user_command using p_v_ucomm like SY-UCOMM
p_s_selfield type slis_selfield.
*---tratamento de impressão do Sapscript----
CASE p_v_ucomm.
FLAG = 0.
WHEN 'IMPRIMIR' OR 'PRINT'.
LOOP AT i_ekpo.
IF NOT i_ekpo-BOX IS INITIAL.
FLAG = FLAG + 1.
ENDIF.
ENDLOOP.
se tiver selecionado apenas uma box
IF flag EQ 1.
IF p_gerar EQ 'X'.
*-----perform para confirmação de download
PERFORM zf_popup_to_confirm.
ENDIF.
*------chama o form para imprimir o sapscript
PERFORM zf_sapscript.
ENDIF.
box estiver vazia
IF flag EQ 0.
MESSAGE E017(ZCL_GRUPO04). "Selecione apenas uma BOX
"referente ao pedido de compras.
STOP.
ENDIF.
"estiver selecionado + de uma box
IF flag GT 1.
MESSAGE E017(ZCL_GRUPO04). "Selecione apenas uma
"BOX referente ao pedido de compra.
STOP.
ENDIF.
ENDCASE.
CASE p_s_selfield-sel_tab_field.
*observe na exibição do relatório(hierarquico) que temos o EKKO-EBELN
ficaria melhor visualmente, a utilização de clicar no mesmo
WHEN 'I_EKPO-EBELN'. "tab de saida
SET PARAMETER ID 'BES' FIELD p_s_selfield-VALUE.
CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
ENDCASE.
endform. " zf_user_command
*& Form ZSET_PF_STATUS
text
-->P_EXTAB text
form ZSET_PF_STATUS using p_extab.
set pf-status 'BOTOES' EXCLUDING extab.
endform. " ZSET_PF_STATUS
*& Form zf_sapscript
text
--> p1 text
<-- p2 text
form zf_sapscript.
--carregar a ITCPO----
PERFORM zf_itcpo.
----chamar a função Open_form
PERFORM zf_open_form.
*----buscar o fornecedor e seus dados
LOOP AT I_ekko.
v_element = 'CABPRIN'.
v_type = 'BODY'.
v_window = 'JANCABEC'.
PERFORM zf_imprime_form USING v_element
v_type
v_window.
ENDLOOP.
*----buscar o documento de compra selecionado
LOOP AT i_ekpo.
IF i_ekpo-BOX = 'X'.
v_element = 'MAIN'.
v_type = 'BODY'.
v_window = 'MAIN'.
PERFORM zf_imprime_form USING v_element
v_type
v_window.
*---o comando EXIT é para que somente quando 1 registro for selecionado
no relatório e a verificação da igualdade acontecer faz que saia do
Loop
EXIT.
ENDIF.
ENDLOOP.
PERFORM zf_close_form.
endform. " zf_sapscript
*& Form zf_itcpo
text
--> p1 text
<-- p2 text
form zf_itcpo.
*Parâmetros para impressão da tabela ITCPO
ITCPO-TDCOPIES = 1. "Quantidade de cópias
ITCPO-TDPAGESLCT = ''. "Seleção de páginas
ITCPO-TDPROGRAM = SY-REPID. "Captura o nome do programa
ITCPO-TDIMMED = c_on. "Saída imediata do relatório
ITCPO-TDPREVIEW = c_on. "Exibição prévia do relatório
ITCPO-TDDEST = 'LOCL'. "SPOOL: dispositivo de saída
ITCPO-TDFAXUSER = SY-UNAME. "Usuário logado naquele momento
ITCPO-TDSENDDATE = SY-DATUM. "Data de envio desejada
ITCPO-TDSENDTIME = SY-UZEIT. "Hora envio desejada
ITCPO-TDNEWID = c_on. "Nova ordem SPOOL
ITCPO-TDARMOD = c_on. "IMPRIMIR: modo de arquivamento
ITCPO-TDTITLE = 'Relatório de Compras por Classificação Contábil'.
endform. " zf_itcpo
*& Form zf_open_formBoa Tarde Carlos,
Welcome to the SDN Forums. SDN gets it's power from the large community throughout the world. To harvest that power of knowledge we have settled on one language for posts here which is English.
Clearly English is not your first language, but don't be afraid, I would vouch that for most of the participant here on SDN English is the second language.
As it is for me. I am just lucky, that I am living in the States long enough that German colleagues start to look at me strangely when I talk to them in German, because it doesn't totally sound right anymore
So we are very forgiving her in SDNland regarding grammar and spelling (although not as much anymore in the Weblogs), we even provide a spell checker.
Please post your question again in English.
If people don't understand you they will ask you about the things that they don't understand and you can then clarify.
Try it out. Your chance of an excellent responds is way higher.
Boa sorte, Mark. -
I have forgotten to turn off the FIND MY iPhone appplication before i reset up the phone, Now it's asking me to verify with apple or icloud ID but when i entered the same ID which was registered with itune & icloud, It says INCORRECT. It's been already 03 days, I am asking help with apple care centre, UAE, Head qurter, UK, USA but they are just sending me a link to reset up which still doesn't work. I am really dissapointed that i have wasted my 700 US dollar. Is it true that i can't use anymore this iPhone if i can't unlock? or there is any one to help in Dubai, Since i am staying in Dubai. I had called Dubai authorised care cantre. They asked my apple serial & IMEI number, They said ' the serial number is based on USA support but i bought in retail shop in UAE, They are also helpless. I am really unhappy with Apple sevice what they provide the customer. If it's so complicated the i wouldnt buy iPhone. Why they can't reset up my iphone like new mobile using their software. Please help me if anyone of you have solution for this. I am really sad that i wasted 700 USD. Can someone help me??
Thank you Chris for your concern. But It doesnt go through.
I tried through iForget,
01.
Select your authentication method.
Email authentication: To access your information, we will send an email to the address(es) on file for you.
Answer security questions: To access your information, you will need to answer the security question(s) provided when you originally created your Apple ID.
02.
Email has been sent.
When you receive your sign in information, follow the directions in the email to reset your password.
But
I m not receiving any authentication email even it says that email has been sent, & trtied to verify my birth date & all then it says
Password Reset
Your Apple ID password has been reset.
Return to My Apple ID
After all, I am just putting the same id & password, It says INCORRECT.
"Is it my problem is not clear to you all? Please help me. Thank you!
Regards
Sujan
Maybe you are looking for
-
Wi-Fi profiles not following priority
Hello everybody, Short version: Wi-Fi profiles don't follow the priority order, it remains connected to the lowest priority network even though higher priority ones are available. Every day on my way home, my BlackBerry Bold 9700 connects to an open
-
Hi Gurus, can anyone suggest to me what is the exact datasource suitable for the 0SR_FIC01, i was serched into the help.sap.com(http://help.sap.com/saphelp_nw70/helpdata/en/83/e1283fd0ca8443e10000000a114084/frameset.htm) but there is nothing was defi
-
Hi All, I am trying to record a BDC for transaction se78. After executing the recording I am getting an error " Field RB_GRAPHIC_BCOl. does not exist in the screen SAPMSSCH 2000". Can any one please help me how to get rid of this error. Thanks and
-
How to view history status of a Network activity of a WBS element
Hi, Which transaction can I use to view history of a Network Activity on a WBS element? I want to know when were changes made on an activity, e.g. when it was REL or TECO etc, and by whom. Thanks. PS_PS01
-
Hi Gurus, I am configuring ALE for material master distribution for a custom message type. I need to filter Material type(MARA-MTART = YV etc). I created Filter object type(tcode= BD95) and assigned this object to Z message type using Tcode = BD59. M