New Z-table to auto-populate description based on the key field entered
Hi Gurus,
I have to created a z-table, there are several fields however I am interested in only two
1) VSTEL and 2) PADEST for shipping point and the printer name. Also there are two other fields I have added to the table that are the descriptions for VSTEL and PADEST. Now the requirement is that when the user enteres a value in table maintenance ( sm30)
for say VSTEL, then its description should auto populate or propose the right values. Same should happen for the PADEST and its description field.
Thanks.
Goto the Table maintenance generator of the Table.
On this screen.
Environment -
> Modification -
> Events
Create New entry in the table with T = 05 and Z <any name>
Save it.
An editor button appears next to the from name.
Click on it and create an include.
Write your code in this include...
select vstel
padest
from table XXXX into table I_XXXX
where vstel = (Z_VSTEL)User enterd VSTEL in module pool.
If sy-subrc = 0.
loop at I_XX into wa_xxx.
if wa_xxx-vstel = Z_vstel.
z_padest(Desc field in Tab maint) = wa_XXX-PADEST.
endif.
endloop.
endif.
The same logic can be used to get the desc for VSTEL and PDEST.
You can change this in many ways based on performance.
The above code is just to give an idea...
Regards,
Kittu
Similar Messages
-
Table maintenance - auto-populate description field based on other field
Hello,
I have a custom table with 2 fields in it. Customer and Name. For customer field, I am using a standard customer search help. My requirement is when I search for a customer and select a customer, how can the name field be auto populated with customer name? I am looking for a best way to do this.
Thanks,
AVhi adrian,
One method to achieve this functionality would be :
1. Find out the maintenance screen and function group of the table maintenance generator say 0001 and Z03_PRO_FN. ( u can find out by going into tables - > utilities -> tmg - to find Function group. for screen number- from TMG ->utilites->modifications->maintanence screen -> note the screen number).
2. Go to SE80 and open Z03_PRO_FN screen number 0001.
3. For field 1 - create a module in Process on Value Request Event in PAI of the maintenance screen ( Similar to any module pool program)
call the FM F4IF_INT_TABLE_VALUE_REQUEST( In Process on Value request event of field 1 in PAI)
4. Use FM DYNP_VALUES_Update to read the value of field 1 on the screen ( Because this is before enter is pressed and field 1 on the module pool porogram would not be populated with value ) and update the field 2.
Regards,
Sivaganesh -
Is there a way to auto-populate text based on a selection?
I honestly don't even know how to word my question haha... so the title may be misleading...
For my job I need to fill out indesign files, and at one part of the file based on the state a person is from I need to paste a specific e-mail in several places.
Is there a way where maybe I create a dropdown menu of the several state e-mails I can choose from, and upon choosing it auto-populates that choice into the several other places?
I guess, is there a way where if I make a select or input text into one area it will generate in the other areas as well?Maybe you need some kind of clipboard manager to choose several texts to paste
http://lifehacker.com/5298615/five-best-clipboard-managers -
Creation of internal table dynamically based on the Date Range entered
Hi SAPgurus,
I have been facing one issue i.e creation of internal table dynamically based on the date range entered in the selection screen. For example the date range I am giving as 06/2006 to 08/2006, it should display the Fieldcatelog dynamically, this part i have completed but the only issue I am facing is to populate the sales data into that fields.
Right now my program is displaying the ALV like this.
Ex:
<b>CSR District 06/2006 07/2006 08/2006 totals</b>
Shiva New York 10.00
Shiva new york 30.00
Shiva new york 40.00
but it should display like this
<b>CSR District 06/2006 07/2006 08/2006 totals</b>
Shiva New York 10.00 30.00 40.00
80.00
Please help me in this scenario, how to acheive like this..
Thanks & Regards,
Sivaram KandulaHi Sivaram,
I also got the same requirement . i saw rich and your code whatever you have uploaded.i have created dynamic internal table but i am facing the issue to populating the data to my dynamic internal table.
Sivaram, can you please explain your code after this.
*<dyn_table>
*tab_item.
LOOP AT tab_item.
ASSIGN COMPONENT 1 OF STRUCTURE <dyn_wa> TO <dyn_table>.
ASSIGN COMPONENT 2 OF STRUCTURE <dyn_wa> TO <dyn_table>.
* <dyn_wa> = tab_item-bztxt.
* <dyn_wa> = tab_item-total.
* APPEND <dyn_wa> TO <dyn_table>.
** <dyn_wa> = tab_item-total.
** ASSIGN tab_item-bezei TO <dyn_wa>.
* APPEND <dyn_table>.
ENDLOOP.
how you are puting the loop at tab_item. but tab_item is already commented.
can you send me the code after that.
i am sending some part of my code.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fCAT1
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <dyn_table>.
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
select vbeln
fkart
vkorg
vtweg
fkdat
spart
fksto
from vbrk
client specified
into table gt_vbrk
where mandt = sy-mandt
and fkart in ('ZF5','ZFR')
and vkorg = '1100'
and vtweg = '20'
and fkdat in s_fkdat
and spart = '06'
and fksto = ' '.
if gt_vbrk[] is not initial.
select vbeln
fkimg
prsdt
netwr
matnr
arktx
werks
mwsbp
from vbrp
client specified
into table gt_vbrp
for all entries in gt_vbrk
where vbeln = gt_vbrk-vbeln
and werks in s_werks
and matnr in s_matnr.
endif.
select mnr ltx spras from t247
into table it_t247
where spras = 'E'.
data: lv_month1 type vbrp-prsdt,
name1(3) type c,
s_month type string,
s_month1 type string,
s_month2 type string.
* lv_netwr1 type vbrp-netwr,
* lv_mwsbp1 type vbrp-mwsbp.
loop at gt_vbrp into gs_vbrp.
gs_final2-matnr = gs_vbrp-matnr.
gs_final2-arktx = gs_vbrp-arktx.
gs_final2-fkimg = gs_vbrp-fkimg.
lv_month1 = gs_vbrp-prsdt.
read table it_t247 into wa_t247 with key mnr = lv_month1+4(2).
if sy-subrc eq 0.
name1 = wa_t247-ltx.
endif.
concatenate name1
lv_month1(4) into s_month SEPARATED BY '_' .
CONCATENATE S_MONTH 'QTY' INTO S_MONTH1 SEPARATED BY ''.
CONCATENATE S_MONTH 'VALUE' INTO S_MONTH2 SEPARATED BY ''.
gs_final2-month = s_month.
lv_netwr1 = gs_vbrp-netwr.
lv_mwsbp1 = gs_vbrp-mwsbp.
gs_final2-MONTH_QTY = S_MONTH1.
GS_FINAL2-MONTH_VAL = S_MONTH2.
gs_final2-value = lv_netwr1 + lv_mwsbp1.
append gs_final2 to gt_final2.
clear: gs_final2. "lv_name2.
endloop.
if gt_final2[] is not initial.
sort gt_final2 by matnr month ascending .
loop at gt_final2 into gs_final2.
gs_final2_01 = gs_final2.
collect gs_final2_01 into gt_final2_01.
endloop.
endif.
ENDIF..
Regards
Ankur -
Logic to populate the key field of a DSO
Hi SDN community,
I have a very unique requirement and need ur help on this.
I have a created a generic Datasource with two fields <b>Material Number</b> and <b>Minimum Quantity</b>. This is loaded into MINDSO01.
The MINDSO01 in BW side will have two Key Fields:<b>Material Number and Load Date</b>. (Load Date is not a filed coming from the Datasource it is nothing but the date when the load is happened.)
The reason to have Load Date as the key is, each time the DSO is loaded the records have to be unique.
<b>Now my question is how do I populate the Load Date filed of the DSO which is the KEY field for the DSO???
If I load on 9/25/2007 then the load date should be 9/25/2007.</b>
<b>MAT01 9/25/2007</b> 5
<b>MAT02 9/25/2007 </b> 8
<b>MAT03 9/25/2007</b> 13
bolded fileds are the keys of the DSO.
Any suggestion are really appreciated and will award points for sure.
Please do help me out with this issue.<b></b>Hi Snigdha,
You can write a routine for the infoObject Load date is equal to sy-datum. So that it will take the value of the date as the day when the date is loaded and populates.
If you are using 3.x, then write start / End routines in update rules or else if you using BI7, write routines in Transformations.
Let me know details.
Reg
Pra -
I would like to use Formcentral form data to populate a pdf with the same fields. Is that possible?
Randy,
We have an application that I would like to have in Formscentral. That application is also in a larger PDF file that once filled in populates all the other forms below it (lease, credit check form, ect). If the Application on Formscentral keep the same field names as the pdf can I pull the data from formscentral and sill populate the old application pdf so that all the forms below it will be also populated.
Greg -
How to read an internal table with more than one (2 or 3) key field(s).
how to read an internal table with more than one (2 or 3) key field(s). in ecc 6.0 version
hi ,
check this..
report.
tables: marc,mard.
data: begin of itab occurs 0,
matnr like marc-matnr,
werks like marc-werks,
pstat like marc-pstat,
end of itab.
data: begin of itab1 occurs 0,
matnr like mard-matnr,
werks like mard-werks,
lgort like mard-lgort,
end of itab1.
parameters:p_matnr like marc-matnr.
select matnr
werks
pstat
from marc
into table itab
where matnr = p_matnr.
sort itab by matnr werks.
select matnr
werks
lgort
from mard
into table itab1
for all entries in itab
where matnr = itab-matnr
and werks = itab-werks.
sort itab1 by matnr werks.
loop at itab.
read table itab1 with key matnr = itab-matnr
werks = itab-werks.
endloop.
regards,
venkat. -
User based block the pricing field in the sale order
HI FRIEND
We have requirement user based block the pricing field in the sale order
pls suggest me the configuration steps
with regards
dineshhi friend
when create a sale orde,r price and exchange rate is triigger from the master record.
head department want not require to End user to change the price in the sale order .
so head department only have authorisation to change price.
selected user is not allow the change the price.
so i need the configuration
with regards
dinesh -
Should we index table vbfa if vbeln and vbelv is already key field.
Dear All,
actually I am passing billing document into vbfa and want vbelv for faster access data from data base into internal table
should we index table vbfa if vbeln and vbelv is already key field.
Regards
chandrashekarno need.
-
ALV Output - Need to show count of line items based on 1 key field.
Hi All,
In my prog i need to show an ALV ouput which is having Matnr,Material type and Division . MATNR is the key field. I need to show how many line items are present against a particular MATNR in that ALV ouput itself. Not in the top of page. I think there might be some field in SLIS which can be use for the same. If any one has come across such a requirement then please revert back.
thanx,
Shyam.
PS: Useful answers will be rewarded.Ok, so we are back to using the COUNT field and now using the SORT functionaity, the SORT will allow us to subtotal by MATNR.
REPORT zrich_0001.
* Global ALV Data Declarations
TYPE-POOLS: slis.
* Internal Tables
TYPES: BEGIN OF talv ,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
spart TYPE mara-spart,
count TYPE i,
END OF talv.
DATA: ialv TYPE TABLE OF talv WITH HEADER LINE.
DATA: fieldcat TYPE slis_t_fieldcat_alv.
DATA: sort TYPE slis_t_sortinfo_alv.
DATA: layout TYPE slis_layout_alv.
START-OF-SELECTION.
PERFORM get_data.
PERFORM call_alv.
* Form GET_DATA
FORM get_data.
SELECT matnr mtart spart INTO TABLE ialv
FROM mara UP TO 500 ROWS.
ENDFORM. "GET_DATA
* CALL_ALV
FORM call_alv.
PERFORM build_field_catalog.
PERFORM build_sort.
layout-countfname = 'COUNT'. "<----- HERE
* Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_sort = sort
is_layout = layout
it_fieldcat = fieldcat
TABLES
t_outtab = ialv.
ENDFORM. "CALL_ALV
* BUILD_FIELD_CATALOG
FORM build_field_catalog.
CLEAR: fieldcat. REFRESH: fieldcat.
DATA: tmp_fc TYPE slis_fieldcat_alv.
tmp_fc-reptext_ddic = 'Material'.
tmp_fc-fieldname = 'MATNR'.
tmp_fc-tabname = 'IALV'.
tmp_fc-outputlen = '18'.
APPEND tmp_fc TO fieldcat.
tmp_fc-reptext_ddic = 'Material Type'.
tmp_fc-fieldname = 'MTART'.
tmp_fc-tabname = 'IALV'.
tmp_fc-outputlen = '4'.
APPEND tmp_fc TO fieldcat.
tmp_fc-reptext_ddic = 'Division'.
tmp_fc-fieldname = 'SPART'.
tmp_fc-tabname = 'IALV'.
tmp_fc-outputlen = '2'.
APPEND tmp_fc TO fieldcat.
tmp_fc-reptext_ddic = 'Count'.
tmp_fc-fieldname = 'COUNT'.
tmp_fc-tabname = 'IALV'.
tmp_fc-outputlen = '5'.
tmp_fc-do_Sum = 'X'.
append tmp_fc to fieldcat.
ENDFORM. "build_field_catalog
*& Form build_sort
* text
FORM build_sort.
DATA: tmp_sort TYPE LINE OF slis_t_sortinfo_alv.
CLEAR sort. REFRESH sort.
CLEAR tmp_sort.
tmp_sort-fieldname = 'MATNR'.
tmp_sort-tabname = 'IALV'.
tmp_sort-up = 'X'.
tmp_sort-subtot = 'X'.
APPEND tmp_sort TO sort.
ENDFORM. "build_sort
Regards,
Rich Heilman -
Does adding a field to a table affect a data block based on the table?
If I make a change to a table like adding a field does it affect data data blocks based on the table?
The other place I have seen where adding a new column to a table causes problems is when a programmer codes: Select * from table.
If that is coded in a form, the form will need to be recompiled before it will work properly. -
Tabular form - how to auto populate a column with the user name
Hi,
I have a tabular form with 3 columns - (customer name, notes, user). my users are allowed to enter customer details in the notes section... as soon as the user completes notes section and save the form, I want "USER" field to be auto populate with the user name so that I may track activity by the user...
Please advice how to accomplish it...
thanks in advanceHi,
After user saves the forms that means commit to the database, so you can simply write a trigger like:
CREATE OR REPLACE TRIGGER "AUDIT"
before insert or update on TABLE1
for each row
begin
:new.user_field := nvl(v('APP_USER'),user);
end;
Regards,
Aljaz
Edited by: Aljaz on 4.3.2012 22:03 -
PM Order description based on the Package Due
Hello Experts,
Can anyone explain me if PM Order description can be defaulted based on the Package Due such as Weekly, Monthly, Quarterly, Annual, etc..
I know we can have multiple maintenance items with different task list for each package, so that the order description is copied from the maint.-item description.
Is there any other better way to do this in standard SAP?
Thanks in advance!!!!Hi,
As you told, Order description is getting copied from Maintenance Item.
In Maintenance item, task list will be assigned. As single Task list may be having different packages & Order will consolidate the operations with packages based on Hierarchy, its not possible to bring the package due as description.
One work around would be, maintenance item can be defined based on package. Pre-requisite would be task list based on package.
In the task list, operations should be splitted up based on package. One Task list for one package.
Then create the maintenance item based on package & assign particular task list to that maintenance item.
Regards,
Maheswaran. -
Subtotal in alv report based on the particular field value
Hi,
As per my requirement, i need to do subtotal of quntity field based on the material number field value in alv report.
Ex: if material number falls 1 to 10 then i need to be calculate and display subtotal qty amount with text " total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with text "total of the mat2". similarily i need to display the details.
<removed_by_moderator>
Regards
NagendraHi,
Ex: if material number falls 1 to 10 then i need to be calculate and display subtotal qty amount with text " total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with text "total of the mat2". similarily i need to display the details.
What you can do is in your output table, you will have to create an auxilary field, lets call it as material group (groupid). Now you can do a subtotal on the material group. However the logic to determine what materials belong to which group should be coded. I guess you might be having some logic for that.
So lets say that material 1 to 10 as G1 ( group 1 ) and material 11 to 20 as G2 ( group 2 )
The output of the internal table would be
Groupid matnr ...
1 1
1 2
1 3.....and so on
2 11
2 12
2 13....upto 20.
Now in the fieldcatalog assign an 'X' to the 'dosum' parameter to the field Groupid
In the sort info do the following :
gs_sort-fieldname = 'GROUPID'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'. ***CRUCIAL STATEMENT****
append gs_sort to gt_sort.
Now pass all this data to the alv grid function. And you are done.
regards,
Advait -
How do we check the check box items based on the databse fields.
Hi All,
I have a requirement like as mentioned below#
1. I have a combox box whcih i will be populated from database.
2. I have created two check box as "Stategric " and "Non Stategric".
3. Now when i select the combox box condition i need to select the check box items.
4. But the problem is i wil be knowing weather it is a stategric or Non stategirc based on the database column.
5. How do i need to map the database point of view and correlacte with javascript pont of view.
6. Do we need to write any Application process to achieve this task and who we can do that.
Thanks,
Anoo..Hi VC,
As per my understanding the code should be placed between --.
Based on this i have placed the code
function setCheckbox(pThis, pItem){
alert('inside');
var l_code = '';
// Get checkbox name
rName = document.getElementsById('P1_ENG_BAU').firstChild.name;
alert("The value is"+rName);
// Fire AJAX
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
get.add('F120_COMPANY',pThis.value);
gReturn = get.get('XML');
if (gReturn) {
var values = gReturn.getElementsByTagName('value');
var messages = gReturn.getElementsByTagName('message');
// Build the checkbox
for (i=0; i<values.length; i++) {
var rValue = values.firstChild.nodeValue;
var rMessage = messages[i].firstChild.nodeValue;
l_code+='<input id='+P1_ENG_BAU+'_'+i+' type=checkbox value='+rValue+' name='+rName+'>';
l_code+='<label for='+P1_ENG_BAU+'_'+i+'>'+rMessage+'</label>
document.getElementsById('P1_ENG_BAU').innerHTML = l_code;
Correct me if iam understanding is wrong.
Thanks,
Anoo..
Edited by: Anoo on May 31, 2012 11:04 AM
Maybe you are looking for
-
Open file XDP in live cycle Designer 9.0.1 of SAP
Hello, I need upload a adobe form, but i dont kown it. The form is a file with extension *XDP. In adobe live cycle designer only import forms in format *XML. Can you help me please? Thanks
-
Hack to restore the option to play in Finder window?
I know the Finder no longer has the option to play a song or movie within the window (truly within). It was a super-cool option in OS 10.4.11 and before. Now all I have is "QuickLook" that only plays when the chosen Finder window is front. I can no l
-
I can't download the creative cloud desktop
I've been trying to download this for over 24 hours now, with no luck. Everytime I try, I get this message: We've encountered the following issue: The remote server is not responding in a proper manner. Please try again in a few minutes. Please help!
-
HT1822 Mac OS X server admin tools: non-server editions of Mac OS 10.6?
On my iMac, I am running the installation of OS X that it shipped with + updates up to 10.6.8. I know there are server admin tools available on the Apple support website, that do stuff like manage groups. I am looking for a GUI to look at ALL the u
-
Hi All, Our db is 2 nodes RAC db on window 2003 server. The database version is 10.2.0.3 Enterprise Edition. My question is: we have the following messages in our db alert log but when I tried to look into the trace file I can't find the trace file i