How to capture values dynamically from output screen
Hi all,
I have a new requirement.
i developed a report which is showing output correctly. Here i have to take a check box for every record in output screen. if i check some of the check boxs then it should allow for further processing.
i succeeded upto put checkboxes on output screen.
but i don't know how to capture the values of checkboxes of every record into an internal table. it is necessary to capture into an internal table
will it be work by using LOOP AT SCREEN statement.
could you please explain with examples. it is normal report program only.
i would appreciate an early reply
Regards
Prabhakar
Sample code for usage:
Internal table for Region and its Description
data: begin of t_t005u occurs 0,
LAND1 like t005u-land1,
BLAND like t005u-bland,
Bezei like t005u-bezei,
end of t_t005u.
Ranges for Country
ranges: r_land1 for t005u-land1.
Get the country codes and their descriptions
refresh r_land1.
clear r_land1.
refresh t_dynpfields.
move 'V_LAND1' to t_dynpfields-fieldname.
append t_dynpfields.
clear t_dynpfields.
Read the value in the Country field on the screen
call function 'DYNP_VALUES_READ'
EXPORTING
dyname = 'SAPLZ_VENDOR_MASTER'
dynumb = '0004'
translate_to_upper = 'X'
TABLES
dynpfields = t_dynpfields
EXCEPTIONS
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
read table t_dynpfields with key fieldname = 'V_LAND1'.
if not t_dynpfields-FIELDVALUE is initial.
r_land1-low = t_dynpfields-FIELDVALUE.
r_land1-sign = 'I'.
r_land1-option = 'EQ'.
append r_land1.
clear r_land1.
endif.
Get the Regions to be displayed as F4 Help
select land1
bland
bezei
from t005u
into table t_t005u
where spras = 'EN'
and land1 in r_land1.
if not t_t005u[] is initial..
Popup to display Valid Regions for the selected country
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL = 60
ENDPOS_ROW = 40
STARTPOS_COL = 40
STARTPOS_ROW = 20
TITLETEXT = 'Region'
IMPORTING
CHOISE = v_choice
TABLES
VALUETAB = t_t005u
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
if sy-subrc = 0.
if v_activity = 'V'.
read table t_t005u index v_choice.
if sy-subrc = 0.
v_regio = t_t005u-bland.
move 'V_BEZEI' to t_dynpfields-fieldname.
move t_t005u-bezei to t_dynpfields-fieldvalue.
append t_dynpfields.
Update the Region description on the screen.
call function 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLZ_VENDOR_MASTER'
dynumb = '0004'
TABLES
dynpfields = t_dynpfields
EXCEPTIONS
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
endif.
endif.
endif.
endif.
Similar Messages
-
How to capture an image from my usb camera and display on my front panel
How to capture an image from my usb camera and display on my front panel
Install NI Vision Acquisition Software and NI IMAQ for USB and open an example.
Christian -
TS3274 How do I move icons from one screen to another?
How do I move icons from one screen to another.
Hold down on one icon until they start shaking, then drag the icon to the edge of the screen, and the screen should slide to the next one, you can then drop it on that screen or drag it again to the edge to move to the next screen.
Page 21 of the user guide explains this under Arranging Apps:
http://manuals.info.apple.com/en/ipad_user_guide.pdf -
HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
HI,
HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
thanks,
samba.By selection screen, what do you mean? There is no selection screen in WDA as there was in classic dynpro. Do you mean you are using the Select-Options reusable component? Are you wanting to call a standard transaction via ITS - SAPGUI for HTML? Please provide more details to your question.
-
How to remove duplicates records from output ?
how to remove duplicates records from output ? i used delete adjacent but duplicates records are coming again ..suggest me
hi shruthi,
thanks for ur answer ..but duplicates records coming again
here is my code >> plz check it out
*& Report ZCRM_TROUBLE_TICKET
REPORT zcrm_trouble_ticket.
TYPES : BEGIN OF ty_qmih,
qmnum TYPE qmnum,
equnr TYPE equnr,
iloan TYPE iloan,
ausvn TYPE ausvn,
ausbs TYPE ausbs,
auztv TYPE auztv,
auztb TYPE auztb,
iwerk TYPE iwerk,
END OF ty_qmih,
BEGIN OF ty_qmel,
qmnum TYPE qmnum,
qmtxt TYPE qmtxt,
indtx TYPE indltx,
priok TYPE priok,
strmn TYPE strmn,
strur TYPE strur,
ltrmn TYPE ltrmn,
ltrur TYPE ltrur,
objnr TYPE qmobjnr,
arbpl TYPE lgwid,
vkorg TYPE vkorg,
vtweg TYPE vtweg,
spart TYPE spart,
END OF ty_qmel,
BEGIN OF ty_ihpa,
parnr TYPE i_parnr,
parvw TYPE parvw,
objnr TYPE qmobjnr,
END OF ty_ihpa,
BEGIN OF ty_crhd,
arbpl TYPE arbpl,
objid TYPE cr_objid,
END OF ty_crhd,
BEGIN OF ty_crtx,
ktext TYPE cr_ktext,
objid TYPE cr_objid,
END OF ty_crtx,
BEGIN OF ty_qmfe,
fecod TYPE fecod,
fegrp TYPE fegrp,
qmnum TYPE qmnum,
END OF ty_qmfe,
BEGIN OF ty_qmur,
urcod TYPE urcod,
urgrp TYPE urgrp,
urtxt TYPE urstx,
qmnum TYPE qmnum,
END OF ty_qmur,
BEGIN OF ty_iloa,
tplnr TYPE tplnr,
iloan TYPE iloan,
END OF ty_iloa,
BEGIN OF ty_output,
qmnum TYPE qmnum,
equnr TYPE equnr,
iloan TYPE iloan,
ausvn TYPE ausvn,
ausbs TYPE ausbs,
auztv TYPE auztv,
auztb TYPE auztb,
iwerk TYPE iwerk,
qmtxt TYPE qmtxt,
indtx TYPE indltx,
priok TYPE priok,
strmn TYPE strmn,
strur TYPE strur,
ltrmn TYPE ltrmn,
ltrur TYPE ltrur,
objnr TYPE qmobjnr,
arbpl TYPE lgwid,
vkorg TYPE vkorg,
vtweg TYPE vtweg,
spart TYPE spart,
parnr TYPE i_parnr,
parvw TYPE parvw,
arbpl TYPE arbpl,
objid TYPE cr_objid,
arbpl1 TYPE arbpl,
ktext TYPE cr_ktext,
fecod TYPE fecod,
fegrp TYPE fegrp,
urcod TYPE urcod,
urgrp TYPE urgrp,
urtxt TYPE urstx,
tplnr TYPE tplnr,
END OF ty_output.
DATA : it_qmih TYPE STANDARD TABLE OF ty_qmih,
it_qmel TYPE STANDARD TABLE OF ty_qmel,
it_ihpa TYPE STANDARD TABLE OF ty_ihpa,
it_crhd TYPE STANDARD TABLE OF ty_crhd,
it_crtx TYPE STANDARD TABLE OF ty_crtx,
it_qmfe TYPE STANDARD TABLE OF ty_qmfe,
it_qmur TYPE STANDARD TABLE OF ty_qmur,
it_iloa TYPE STANDARD TABLE OF ty_iloa,
it_output TYPE STANDARD TABLE OF ty_output,
wa_qmih TYPE ty_qmih,
wa_qmel TYPE ty_qmel,
wa_ihpa TYPE ty_ihpa,
wa_crhd TYPE ty_crhd,
wa_crtx TYPE ty_crtx,
wa_qmfe TYPE ty_qmfe,
wa_qmur TYPE ty_qmur,
wa_iloa TYPE ty_iloa,
wa_output TYPE ty_output.
INITIALIZATION.
REFRESH : it_qmih,
it_qmel,
it_ihpa,
it_crhd,
it_crtx,
it_qmfe,
it_qmur,
it_iloa,
it_output.
CLEAR: wa_qmih,
wa_qmel,
wa_ihpa,
wa_crhd,
wa_crtx,
wa_qmfe,
wa_qmur,
wa_iloa,
wa_output.
start-of-selection.
SELECT qmnum
equnr
iloan
ausvn
ausbs
auztv
auztb
iwerk
FROM qmih
INTO TABLE it_qmih.
SORT it_qmih BY qmnum .
DELETE ADJACENT DUPLICATES FROM it_qmih COMPARING qmnum equnr iloan ausvn ausbs auztv auztb iwerk.
SELECT qmnum
qmtxt
indtx
priok
strmn
strur
ltrmn
ltrur
objnr
arbpl
vkorg
vtweg
spart
FROM qmel
INTO TABLE it_qmel
FOR ALL ENTRIES IN it_qmih
WHERE qmnum = it_qmih-qmnum.
SORT it_qmel BY qmnum.
DELETE ADJACENT DUPLICATES FROM it_qmel COMPARING qmnum
qmtxt
indtx
strmn
strur
ltrmn
ltrur
objnr
arbpl
vkorg
vtweg
spart.
IF it_qmel IS NOT INITIAL.
SELECT parnr
parvw
objnr
FROM ihpa
INTO TABLE it_ihpa
FOR ALL ENTRIES IN it_qmel
WHERE objnr = it_qmel-objnr.
ENDIF.
DELETE ADJACENT DUPLICATES FROM it_ihpa COMPARING parnr
parvw
objnr.
IF it_qmel IS NOT INITIAL.
SELECT arbpl
objid
FROM crhd
INTO TABLE it_crhd
FOR ALL ENTRIES IN it_qmel
WHERE objid = it_qmel-arbpl.
ENDIF.
DELETE ADJACENT DUPLICATES FROM it_crhd COMPARING arbpl
objid.
IF it_qmel IS NOT INITIAL.
SELECT ktext
objid
FROM crtx
INTO TABLE it_crtx
FOR ALL ENTRIES IN it_crhd
WHERE objid = it_crhd-objid.
ENDIF.
DELETE ADJACENT DUPLICATES FROM it_crtx COMPARING ktext
objid.
IF it_qmih IS NOT INITIAL.
SELECT fecod
fegrp
qmnum
FROM qmfe
INTO TABLE it_qmfe
FOR ALL ENTRIES IN it_qmih
WHERE qmnum = it_qmih-qmnum.
ENDIF.
SORT it_qmfe BY qmnum.
DELETE ADJACENT DUPLICATES FROM it_qmfe COMPARING fecod
fegrp.
IF it_qmih IS NOT INITIAL.
SELECT urcod
urgrp
urtxt
qmnum
FROM qmur
INTO TABLE it_qmur
FOR ALL ENTRIES IN it_qmih
WHERE qmnum = it_qmih-qmnum.
ENDIF.
SORT it_qmur BY qmnum.
DELETE ADJACENT DUPLICATES FROM it_qmur COMPARING urcod
urgrp
urtxt.
IF it_qmih IS NOT INITIAL.
SELECT tplnr
iloan
FROM iloa
INTO TABLE it_iloa
FOR ALL ENTRIES IN it_qmih
WHERE iloan = it_qmih-iloan.
ENDIF.
DELETE ADJACENT DUPLICATES FROM it_iloa COMPARING tplnr
iloan.
LOOP AT it_qmih INTO wa_qmih.
wa_output-qmnum = wa_qmih-qmnum.
wa_output-equnr = wa_qmih-equnr.
wa_output-iloan = wa_qmih-iloan.
wa_output-ausvn = wa_qmih-ausvn.
wa_output-ausbs = wa_qmih-ausbs.
wa_output-auztv = wa_qmih-auztv.
wa_output-auztb = wa_qmih-auztb.
wa_output-iwerk = wa_qmih-iwerk.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_qmel INTO wa_qmel WITH KEY qmnum = wa_qmih-qmnum.
wa_output-qmtxt = wa_qmel-qmtxt.
wa_output-indtx = wa_qmel-indtx.
wa_output-priok = wa_qmel-priok.
wa_output-strmn = wa_qmel-strmn.
wa_output-strur = wa_qmel-strur.
wa_output-ltrmn = wa_qmel-ltrmn.
wa_output-ltrur = wa_qmel-ltrur.
wa_output-objnr = wa_qmel-objnr.
wa_output-arbpl = wa_qmel-arbpl.
wa_output-vkorg = wa_qmel-vkorg.
wa_output-vtweg = wa_qmel-vtweg.
wa_output-spart = wa_qmel-spart.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_ihpa INTO wa_ihpa WITH KEY objnr = wa_qmel-objnr.
wa_output-parnr = wa_ihpa-parnr.
wa_output-parvw = wa_ihpa-parvw.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_crhd INTO wa_crhd WITH KEY objid = wa_qmel-arbpl.
wa_output-arbpl = wa_crhd-arbpl.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_crtx INTO wa_crtx WITH KEY objid = wa_crhd-objid.
wa_output-ktext = wa_crtx-ktext.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_qmfe INTO wa_qmfe WITH KEY qmnum = wa_qmih-qmnum.
wa_output-fecod = wa_qmfe-fecod.
wa_output-fegrp = wa_qmfe-fegrp.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_qmur INTO wa_qmur WITH KEY qmnum = wa_qmih-qmnum.
wa_output-urcod = wa_qmur-urcod.
wa_output-urgrp = wa_qmur-urgrp.
wa_output-urtxt = wa_qmur-urtxt.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_iloa INTO wa_iloa WITH KEY iloan = wa_qmih-iloan.
wa_output-tplnr = wa_iloa-tplnr.
APPEND wa_output TO it_output.
CLEAR wa_output.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM it_output COMPARING qmnum
equnr
ausvn
ausbs
auztv
auztb
iwerk
qmtxt
indtx
priok
strmn
strur
ltrmn
ltrur
vkorg
vtweg
spart
parnr
parvw
arbpl
ktext
fecod
fegrp
urcod
urgrp
urtxt
tplnr.
*CALL FUNCTION 'STATUS_TEXT_EDIT'
EXPORTING
CLIENT = SY-MANDT
FLG_USER_STAT = ' '
objnr =
ONLY_ACTIVE = 'X'
spras = en
BYPASS_BUFFER = ' '
IMPORTING
ANW_STAT_EXISTING =
E_STSMA =
LINE =
USER_LINE =
STONR =
EXCEPTIONS
OBJECT_NOT_FOUND = 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.
*CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id =
language =
name =
object =
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines =
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
*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 IT_OUTPUT INTO WA_OUTPUT.
*WRITE : / WA_OUTPUT-qmnum,
WA_OUTPUT-equnr,
WA_OUTPUT-iloan,
WA_OUTPUT-ausvn,
WA_OUTPUT-ausbs,
WA_OUTPUT-auztv,
WA_OUTPUT-auztb,
WA_OUTPUT-qmtxt,
WA_OUTPUT-indtx,
WA_OUTPUT-strmn,
WA_OUTPUT-strur,
WA_OUTPUT-ltrmn,
WA_OUTPUT-ltrur,
WA_OUTPUT-objnr,
WA_OUTPUT-arbpl,
WA_OUTPUT-parnr,
WA_OUTPUT-parvw,
WA_OUTPUT-objid,
WA_OUTPUT-ktext,
WA_OUTPUT-fecod,
WA_OUTPUT-fegrp,
WA_OUTPUT-urcod,
WA_OUTPUT-urgrp,
WA_OUTPUT-urtxt,
WA_OUTPUT-tplnr.
*ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'E:\CRM1.TXT'
FILETYPE = 'ASC'
APPEND = ' '
write_field_separator = '|'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
IMPORTING
FILELENGTH =
TABLES
data_tab = it_output
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to capture changed data at ALV screen
Hi ALV Experts,
I am using Following method for ALV display :-
CALL METHOD g_alv_grid_0200->set_table_for_first_display
EXPORTING
i_bypassing_buffer = 'X'
is_layout =
it_toolbar_excluding =
CHANGING
it_outtab =
it_fieldcatalog =
CALL METHOD g_alv_grid_0200->set_ready_for_input
EXPORTING
i_ready_for_input = '1'.
Now I am changing few values in ALV screen and capturing through following Method :-
CALL METHOD g_alv_grid_0200->check_changed_data
IMPORTING
e_valid = l_valid.
THIS ABOVE METHOD STRANGELY CAPTURES CHANGES IN QUANTITY AND DATE FIELDS ONLY AND NOT IN CHARATER FIELDS.
Can somebody suggest how to capture changes of character fields also.
Thanks in Advance,
ChandanHi,
Check whether the following logic helps.
p_er_data_changed TYPE REF TO cl_alv_changed_data_protocol.
DATA :
lwa_mod_cell TYPE lvc_s_modi,
lwa_mod TYPE ty_mod.
LOOP AT p_er_data_changed->mt_good_cells INTO lwa_mod_cell.
lwa_mod-row = lwa_mod_cell-row_id.
APPEND lwa_mod TO i_mod.
ENDLOOP.
Regards,
Lohitha -
How to create value objects from xml
I am receiving xml back from my web service ( e4x ). I am
trying to figure out how to create a value object without having to
manually fetch each value in the value objects constructor. I am
using introspecton in my Java web service to do this. Is there such
a thing in Action Script?
Anyone done this before that can share some code???? Any help
would be very much appreciated.That's twice now I've heard that. lol.
I am using Cairngorm and I suppose out of ignorance perhaps,
I am using VO's. So my web service would return an Object Proxy and
I have some code that could create objects dynamically from the
results. The objects had to be simple of course and now they are
becoming more complex thus the need to change to e4x instead of
objects.
So now I am trying to convert the xml result into the desired
VO to be used throughout the rest of the application. I'm not sure
how to use Cairngorm without the VO's they are tied to everything.
Are you familiar with the architecture? Your thoughts? -
How to Captured Value into Select-Options Range Table Without "Enter"
Hi,
I defined a set of Select-Options in the Web Dynpro. I found that the value for the Select-Options will not be captured whenever I manually type in the value instead of choosing it from F4 Help Drop Down.
However, this problem can be resolved if I manually type in the value for Select-Options in the Selection Field and I press "Enter". Without pressing "Enter" value will not be captured.
Any solution for this issue? Please help.Hi Kris,
My problem is only when the user key in the value themselves rather than choosing it from Select-Options drop down value. Most of the time user will know what value to key in and will skip the step to choose from the Drop Down List. Thus, if this happen, the value keyed in by the user will not be able to capture into the range table.
I am using this logic to capture the value for selection item:
wd_this->m_helper->get_selection_screen_items(
IMPORTING et_selection_screen_items = lt_sel_item ).
* Values From Selection Screen
LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
CASE <fs_sel_item>-m_id.
WHEN `PERNR`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_pernr>.
WHEN `BUKRS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_bukrs>.
WHEN `STAT2`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_stat2>.
WHEN `WERKS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_werks>.
WHEN `BTRTL`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_btrtl>.
WHEN `PERSG`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persg>.
WHEN `PERSK`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persk>.
WHEN `ABKRS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_abkrs>.
WHEN `BEGDA`.
ASSIGN <fs_sel_item>-m_value->* TO <fs_begda>.
ENDCASE.
ENDLOOP.
E.g. User key in the BUKRS without using the Drop Down Value provided by the Select-Options. For this case, <fs_bukrs> table will be initial as no value is captured.
Edited by: Girish Nabar on Apr 21, 2011 8:55 AM -
How to capture error message from standard function module
Dear friends
when i execute standard function module in finance , i am getting error message , pls check the below screen shot,
how to capture the below error message so that i have display in my webdynpro component
Thanks
VijayaHello Vijaya,
Incase of BAPI's they have a return table parameter T_RETURN. Just read that return table to get the error message.
Incase of normal function modules, there will be exceptions raised for the message used inside the function module. Just read the sy-subrc after the FM and based on the sy-subrc value find the respective exception raised.
May be you can try like this, whenever the message is raised it will be stored in the system variable.
CALL FM.
check for the system variables.
sy-msgid = Message ID of the latest message raised.
sy-msgno = message number of the latest message raised.
sy-msgty = message type of the latest message raised.
sy-msgv1 = variable1 of the latest message raised.
sy-msgv2 = variable2 of the latest message raised.
sy-msgv3 = variable3 of the latest message raised.
sy-msgv4 = variable4 of the latest message raised.
Regards,
TP -
Jump to transaction me21n from output screen.
hi,
I am displaying PO ,item no from ekpo table.On the output screen where data is displayed , when i click on PO no i need to go to transaction me21n.Can anyone plz help me and tell me the mechanism.you can go to ME23N where it will display the particular PO.
Check this alv report.
REPORT ZMM_PO_TEXT
no standard page heading
line-size 300
message-id zmsg.
Tables *
TABLES : EKKO, "Purchasing Document Header
EKPO, "Purchasing Document Item
EKBE. "History per Purchasing Doc
Internal table for display *
DATA : begin of it_item occurs 0 ,
ebeln like ekpo-ebeln, "pur doc no
ebelp like ekpo-ebelp, "pur doc no item
matnr like ekpo-matnr, "material no
werks like ekpo-werks, "Plant
bedat like ekko-bedat, "pur doc date
banfn like eban-banfn, "Purchase requisition number
bnfpo like eban-bnfpo, "Item number of purchase requisition
charg like ekbe-charg , "Batch Number
end of it_item.
DATA it_temp like table of it_item with header line.
ALV VARIABLES AND INTERNAL TABLES
TYPE-POOLS: slis.
DATA:st_layout TYPE slis_layout_alv,
it_fieldcat TYPE slis_t_fieldcat_alv,
it_listheader TYPE slis_t_listheader,
it_event TYPE slis_t_event,
keyinfo TYPE slis_keyinfo_alv.
DATA:ls_selfield TYPE slis_selfield.
VARIABLES *
DATA:
v_repid LIKE sy-repid,
name like thead-tdname,
lines like tline occurs 0 with header line.
*SELECTION SCREEN DEFINITIONS
SELECTION-SCREEN: BEGIN OF BLOCK a1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
so_plant FOR ekpo-werks,
so_date FOR ekko-bedat OBLIGATORY,
so_matnr for ekpo-matnr,
so_ebeln for ekko-ebeln,
so_ekorg for ekko-ekorg,
so_ekgrp for ekko-ekgrp.
SELECTION-SCREEN: END OF BLOCK a1.
INITIALIZATION *
INITIALIZATION.
v_repid = sy-repid.
*START-OF-SELECTION
START-OF-SELECTION.
PERFORM get_data.
IF it_item[] IS NOT INITIAL.
PERFORM display_data.
ELSE.
MESSAGE i012(zmsg).
ENDIF.
END-OF-SELECTION *
END-OF-SELECTION.
*START-OF-SELECTION.
*perform get_data.
*perform display_data .
*******AT LINE-SELECTION.
******if it_data-banfn is initial.
******SET PARAMETER ID 'BES' FIELD it_data-EBELN.
******CALL TRANSACTION 'ME23N'.
******else.
******SET PARAMETER ID 'BAN' FIELD it_data-Banfn.
******CALL TRANSACTION 'ME53N'.
******endif.
Form get data ******************
FORM get_data.
if so_date-high is initial.
so_date-high = sy-datum.
endif.
select aebeln aebelp amatnr awerks
b~bedat
c~charg
into corresponding fields of table it_item
from ekpo as a inner join ekko as b
on aebeln = bebeln
inner join eket as c on aebeln = cebeln and aebelp = cebelp
where a~werks in so_plant
and a~matnr in so_matnr
and a~ebeln in so_ebeln
and b~bedat between so_date-low and so_date-high
and b~ekorg in so_ekorg
and b~ekgrp in so_ekgrp .
DELETE ADJACENT DUPLICATES FROM it_item.
SORT it_item by ebeln bedat.
loop at it_ITEM.
select single banfn bnfpo into (it_ITEM-banfn,it_ITEM-bnfpo) from eban where ebeln = it_ITEM-ebeln
and ebelp = it_ITEM-ebelp.
*select single charg into (it_ITEM-charg) from ekbe where ebeln = it_ITEM-EBELP.
if sy-subrc IS INITIAL.
CONCATENATE it_item-banfn it_item-bnfpo INTO NAME.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'B06'
LANGUAGE = sy-langu
NAME = NAME
OBJECT = 'EBAN'
TABLES
LINES = lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MODIFY IT_ITEM.
else.
CONCATENATE it_item-EBELN it_item-EBELP INTO NAME.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F10'
LANGUAGE = sy-langu
NAME = NAME
OBJECT = 'EKPO'
TABLES
LINES = lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
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.
IF LINES[] IS INITIAL.
DELETE IT_ITEM.
ENDIF.
CLEAR: IT_ITEM, LINES.
REFRESH : LINES.
endloop.
ENDFORM. " display_data
*FORM FOR DISPLAY DATA
FORM display_data .
PERFORM fill_layout_structure.
PERFORM fill_field_catalog_table.
PERFORM get_event USING it_event.
PERFORM fill_listheader USING it_listheader.
perFORM call_alv_function.
ENDFORM. " display_data
*& Form fill_layout_structure
text
--> p1 text
<-- p2 text
FORM fill_layout_structure .
st_layout-zebra = 'X'.
ENDFORM. " fill_layout_structure
*& Form fill_field_catalog_table
text
--> p1 text
<-- p2 text
FORM fill_field_catalog_table .
PERFORM fill_field_catalog USING :
'EBELN' 'P.O Number' 'IT_ITEM' 'X' space '10' 'X',
'EBELP' 'P.O. Item No' 'IT_ITEM' space space '10' space,
'BEDAT' 'P.O. Date' 'IT_ITEM' space space '10' space,
'WERKS' 'Plant' 'IT_ITEM' space space '10' space,
'MATNR' 'Material no' 'IT_ITEM' space space '18' space,
'BANFN' 'P.R. Number' 'IT_ITEM' space space '18' space,
'CHARG' 'Batch Number' 'IT_ITEM' space space '10' 'space' .
ENDFORM. " fill_field_catalog_table
*FORM FOR FILLING FIELD CATALOG
FORM fill_field_catalog USING f d t p S o h.
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
STATICS v_pos TYPE i VALUE 1.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = v_pos.
wa_fieldcat-fieldname = f.
wa_fieldcat-seltext_m = d.
wa_fieldcat-tabname = t.
wa_fieldcat-hotspot = h.
APPEND wa_fieldcat TO it_fieldcat.
v_pos = v_pos + 1.
ENDFORM. "fill_field_catalog
*& Form fill_listheader
text
-->P_IT_LISTHEADER text
FORM fill_listheader USING P_IT_LISTHEADER TYPE slis_t_listheader.
DATA : wa_listheader TYPE slis_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info ='PURCHASE ORDER TEXTS '.
APPEND wa_listheader TO it_listheader.
ENDFORM. " fill_listheader
*& Form get_event
text
-->P_IT_EVENT text
FORM get_event USING P_IT_EVENT TYPE slis_t_event.
DATA : wa_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = it_event.
READ TABLE it_event WITH KEY name = slis_ev_top_of_page INTO wa_event.
IF SY-SUBRC = 0.
MOVE 'TOP_OF_PAGE' to wa_event-form.
APPEND wa_event to it_event.
ENDIF.
ENDFORM. " get_event
*FORM FOR TOP_OF_PAGE(to assign form for the top-of-page event)
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader.
ENDFORM. "top_of_page
*FORM FOR ALV FUNCTIONS
FORM call_alv_function.
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 = 'CALL_TCODE'
I_STRUCTURE_NAME =
IS_LAYOUT = st_layout
IT_FIELDCAT = it_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = it_event[]
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 = it_item
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.
*FORM FOR ALV CALL_TCODE
FORM call_tcode USING r_ucomm ls_selfield LIKE ls_selfield.
CASE r_ucomm.
WHEN '&IC1'.
IF ls_selfield-fieldname = 'EBELN'.
SET PARAMETER ID 'BES' FIELD ls_selfield-value.
CALL TRANSACTION 'ME23N'.
ENDIF.
IF ls_selfield-fieldname = 'BANFN'.
SET PARAMETER ID 'BAN' FIELD ls_selfield-value.
CALL TRANSACTION 'ME53N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
For classical
use HIDE statement, AT LINE SELECTION event and CALL TRANSACTION Statement.
regards,
Prabhu
Reward if it is helpful. -
How can i move icons from one screen to the other?
How do i move icons from one page to another?
Tap and hold any icon for a couple of seconds. They'll all start to wobble. Tap and drag the one you want to move to the side of the screen and the next screen will appear; drop the icon on whatever screen you want it on.
You can also do it quicker in iTunes - connect the phone and click the Apps tab in the main window. You'll see a picture of your phone with the apps laid out. Just click and drag -
How to capture the data from a JSP form
Hi
I have a JSP form, My task is to capture the data from a JSP and submit to Data Base. for example I have the field like
Enter Table name to be created in data base: The table name is to be captured by a servlet and by that table name, table should be created in the data base.
Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????
Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????Get the entered value from the jsp into servlet using request.getParameter("enteredTableName"). it will return the String,pass this table name to execute query using JDBC connection and statement objects.
-cheers Ram -
Hi Gurus,
I'm working on Adobe Interactive form developed in WDP ABAP. I have a dynamic field called Roles. User can give n number of roles as Input. How can I capture them in my WDP. I know how to capture if there is a fixed field like name, age, email id etc.. Please give me the detail explaination on this.hi,
when you create a form, the UI elements are created by either directlly dragging and dropping the context elements or map form elements with context elements.
when pdf is online its contents are reflected in the Context Attributes.
so if you change/modify the Context Attributes, the change is reflected in the corresponding form fields.
regards,
-amol gupta -
Yosemite: How do I get back from full-screen to original window size?
Okay, so today I used iPhoto for the first time since I reluctantly upgraded to Yosemite on Friday.
iPhoto is one of the few apps I often take into full-screen mode, and so obviously I noticed today that they've kindly taken away the full-screen arrows in the top right-hand corner of the window in Yosemite.
Posting a question about that in Support revealed the 'new improved' way to go full-screen, which is to click on the green traffic light in the top left-hand corner of the window.
Fair enough, but how do I get my iPhoto window back to the size it was before I went full-screen? I tried clicking the green-button again, but that insists on the window being what I call 'maximised', ie. spread across the entire width of my desktop. I want to snap from full-screen back to the window size I had before going full screen.
The arrows in the top right-hand corner used to do that perfectly well, but they're not there any more so I'm having to resort to laboriously re-sizing my window each time, which is far from ideal.
Anyone able to advise me please?Do we know if it is iPhoto-specific, or do all app windows behave in this way?
Actually, I suppose I could find that out for myself... -
How to Move a field from Header Screen to Overview Screen in SRM 7.0
Hi,
I have a requirement to move a Standard field Service Date from Heder Screen to Overview Screen in Invoice in SRM 7.0. Please let me know how to do it. Both screens are Standard Web Dynpro Components.
I appreciate your help!!
Thanks,
MonicaJay,
Thank you. My problem has been resolved.
Thanks,
Monica
Edited by: Monica Tubati on Mar 1, 2010 11:23 PM
Edited by: Monica Tubati on Mar 1, 2010 11:24 PM
Maybe you are looking for
-
Hi. I'm using LabView to take a series of images with a camera. When I preview the image in the camera's software it appears normal. I use Labview/IMAQ and the VIs that came with the camera. The problem is that the output TIFF files have this nasty b
-
How to use D.O.T on windows 7?
Hi Just a quick question. Where do I find the "tabs" with D.O.T overclock for the msi vga card that was found under display properties in windows xp? I thought about trying them out, never did it on xp and now I don't find them on windows 7 Thanks i
-
IPhoto 7.0.2 Export function not working
I am using iPhoto 7.0.2. When I select a photo and choose Export nothing happens. No dialog box, no errors, nothing. I used this function hundreds of times with iLife '06. What's up?
-
Which adobe reader for Mac OS X Lion 10.7.5?
Which adobe reader is used for a mac os x lion 10.7.5?
-
Hi I've recentley got myself a server wich has arch setup and installed how ever i'm having some trouble with subdomains... So I have a domain name thats in /home/user/public_html which when you use www.domain.com brings up the right page, how ever n