Facing problem in populating a output field only
Hi,
I have created two fields on the screen with names code and description. My requirement is to get F4 help on code field and on selecting value from the popup, the description field as well should filled. I am using FM 'MD_POPUP_SHOW_INTERNAL_TABLE' to get a popup. The popup I am getting is alright as it is showing values for both columns i.e. code and its description. But anyhow when I select a value from the popup list, code field gets filled but the other field remains empty.
I even debugged the program, and there I found that control is assinging values to both fields, but its not showing on screen for description field.
Need help.
Thanks,
Ram
Hi,
Check this function module MD_SHOW_PLANNING_REQUESTS.It is using that function module.
Check this code.May be it can help you.
Tables Declaration
tables : vbap. " Sales Document: Item Data
Constant Declaration *
CONSTANTS:
C_X TYPE C VALUE 'X'. " Translate to Uppercase
Variable Declaration *
Variable for Table index
data v_sytabix like sy-tabix.
Variable for Program name
data L_NAME LIKE SYST-REPID.
Ranges Declaration *
Range for getting values form selection screen
DATA: BEGIN OF range1 OCCURS 0,
SIGN(1),
OPTION(2),
LOW LIKE vbap-vbeln,
high like vbap-vbeln,
END OF range1.
Structure Declaration *
Internal table Declaration *
Internal table for Report output
data: begin of i_vbap occurs 0,
vbeln like vbap-vbeln, " Sales Document
posnr like vbap-posnr, " Sales Document item
end of i_vbap.
Internal table for output to the F4 help
data: begin of I_DISPLAY occurs 0,
vbeln like vbap-vbeln, " Sales Document
posnr like vbap-posnr, " Sales Document item
end of I_DISPLAY.
Internal table for return value form function module
DATA: BEGIN OF I_RETURNVAL OCCURS 0.
INCLUDE STRUCTURE DDSHRETVAL. " Interface Structure Search
DATA: END OF I_RETURNVAL.
Internal table for F4 help field heading
DATA: I_FIELDTAB LIKE DFIES OCCURS 0 WITH HEADER LINE.
Internal table for getting screen values from selection screen
data L_SCR_FIELDS LIKE DYNPREAD OCCURS 1 WITH HEADER LINE.
Field-Symbols *
Selection-screen *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME title text-001.
select-options:
S_VBELN for vbap-vbeln no intervals,
S_POSNR for vbap-posnr no intervals.
SELECTION-SCREEN end OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST *
at selection-screen on value-request for s_posnr-low.
clear: L_SCR_FIELDS, I_FIELDTAB, i_display, I_RETURNVAL.
refresh: L_SCR_FIELDS, I_FIELDTAB, i_display, I_RETURNVAL.
L_NAME = SYST-REPID.
MOVE 'S_VBELN-LOW' TO L_SCR_FIELDS-FIELDNAME.
APPEND L_SCR_FIELDS.
Call the Function module DYNP_VALUES_READ to get the values form
selection screen
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = L_NAME
DYNUMB = SYST-DYNNR
TRANSLATE_TO_UPPER = C_X " X
TABLES
DYNPFIELDS = L_SCR_FIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11
IF SY-SUBRC eq 0.
LOOP AT L_SCR_FIELDS.
range1-sign = 'I'.
range1-option = 'EQ'.
range1-low = L_SCR_FIELDS-FIELDVALUE.
range1-high = space.
append range1.
ENDLOOP.
ENDIF.
F4 help Field headings
I_FIELDTAB-TABNAME = 'I_DISPLAY'.
I_FIELDTAB-FIELDNAME = 'VBELN'.
I_FIELDTAB-POSITION = '1'.
I_FIELDTAB-OUTPUTLEN = '10'.
I_FIELDTAB-INTTYPE = 'C'.
I_FIELDTAB-INTLEN = '10'.
APPEND I_FIELDTAB.
I_FIELDTAB-FIELDNAME = 'POSNR'.
I_FIELDTAB-POSITION = '2'.
I_FIELDTAB-OFFSET = '10'.
I_FIELDTAB-OUTPUTLEN = '6'.
I_FIELDTAB-INTTYPE = 'N'.
I_FIELDTAB-INTLEN = '6'.
APPEND I_FIELDTAB.
Retrieve sales document, Sales document item from table Sales
Document: Item Data(VBAP).
Primary keys used for selection: VBELN
select vbeln posnr from vbap
into table i_display
where vbeln in range1.
Call the function module F4IF_INT_TABLE_VALUE_REQUEST for F4 values
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'POSNR'
WINDOW_TITLE = 'Line Item'
VALUE_ORG = 'S'
MULTIPLE_CHOICE = C_X " (for muliple selection)
TABLES
VALUE_TAB = I_DISPLAY
FIELD_TAB = I_FIELDTAB
RETURN_TAB = I_RETURNVAL
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
ELSE.
Star for For single values
READ TABLE I_RETURNVAL INDEX 1.
S_POSNR-LOW = I_RETURNVAL-FIELDVAL.
End for the single values
Start For multiple selection
loop at i_returnval.
s_posnr-sign = 'I'.
s_posnr-option = 'EQ'.
s_posnr-low = I_RETURNVAL-FIELDVAL.
append s_posnr.
endloop.
sort s_posnr.
read table s_posnr index 1.
End for multiple selection
ENDIF.
Start-of-selection *
start-of-selection.
Retrieve sales document, Sales document item from table Sales
Document: Item Data(VBAP).
Primary keys used for selection: VBELN
select vbeln posnr from vbap
into table i_vbap
where vbeln in s_vbeln
and posnr in s_posnr.
if the above selection is successful continue the process else exit *
form the report
if sy-subrc ne 0.
message e002 with 'No data to display'.
endif.
End-of-selection *
end-of-selection.
if not i_vbap[] is initial.
loop at i_vbap.
write:/ i_vbap-vbeln, i_vbap-posnr.
endloop.
endif.
Similar Messages
-
Adhoc query-Problem with Personnel no output field
Hi Gurus,
We are trying to run an adhoc query using a customized Info set(PNPCE logical database).
While running the query,we had selected Personnel no(from Payroll status P0003 table) as output field and Company code(from Org assignment P0001) as input field in the selection.
Problem is in the output field we are seeing the Personnel name details in place of Personnel no.Could anyone please suggest what could be the reason behind this and how to fix it.
Your help will be highly appreciated.
Warm Rgds
SushilHi Sushil,
The default output for fields with a text and a value (Name = text, PERNR = value) is the text. You can change this by right clicking on the output box in Ad Hoc and selecting "Value". If you want both name and number, select "Value and Text".
You can also change this default to Value from Text if in Ad Hoc, you go to Edit --> Settings. On the last tab, change the radio buttion for output default to Value from Text. This will change it for all fields so you would see the eight digit number rather than the name of the position or org unit. Thus, you may want to keep it at Text and use the right click to change specific fields as needed.
By the way, it is usually best to utilize the personnel number field from IT0000-Actions, although it can be obtained from any infotype if you include that field in the field group when creating your infoset.
Paul -
Problem with populating internal with field-symbol
hi all,
I have following structure of internal table .
internal Table 1(int1) : source,source_field, and other fields.
internal Table 2 (int2): x1,x2,x3,x4,x5,x6 .
Read table 1 assigning <gs_t1> with....
assign ( <gs_t1>-source_field ) to <ld_char> .
case <gs_t1>-source.
when 'int1'.
Read int1 assgining <gs_int1> .
ASSIGN COMPONENT <ld_char> OF STRUCTURE <gs_int1>
TO <fs_char>.
wa_output-x1 = <fs_char>.
simillarly,
ASSIGN COMPONENT <ld_char> OF STRUCTURE <gs_int1>
TO <fs_char>.
wa_output-x2 = <fs_char>.
The source_field of int1 contains any value either it can be x2,x3,x4 .
Now the problem is how my work wa_output should know that <fs_char> contains value of field x1 .
I mean to say how we willl determine that value to be passed is to wa_output-x1 or wa_output-x2 as <ld_char> is just a pointer we cannot determine anything .
so how should i make my workarea . It can be made as a fields-symbol but how to that .
As it is having a strucutre of like :
componenet component_type
CONTROLLER PRXCTRLTAB<-this is also a line type having value two fields
x1 char5
x2 char5
Plz help...Hi all,
i have to pass all field values after obtaining them to a workarea wa_output .
data : wa_output type xyz.
READ TABLE ist_smp_tst ASSIGNING <gs_smp_tst>
WITH KEY iden_no =
<gs_smp_tst_dtl>-iden_no
BINARY SEARCH.
ASSIGN COMPONENT <ld_char_val> OF STRUCTURE
<gs_smp_tst_lab> TO <fs_char>.
CONCATENATE 'WA_OUTPUT-' <fs_char> INTO l_field.
ASSIGN (l_field) TO <wa_field>.
<wa_field> = <fs_char>.
read table ist_temp .........
<wa_field> = <fs_char>.
I have done this but <wa_field> actually holds the current data of <fs_char>
it should be like
wa_ouput-f1 = <fs_char>..
wa_output-f2 = <fs_char>.
and the appending it to wa_output to i_output .
How we can do this using field-symbol.
Plz required help.
Regards. -
Facing problem to upload MRP output PO from more than one user
We have 11 users in our company. but we can upload MRP output PO from only one user. we need to upload from more users... please help
Hi Hitul,
Query is not clear.
MRP output will be planned order or purchase requsition. Purchase requsition further converted to purchase order. Are you using any Z developed program for uploading the Purchase Orders (PO) in system ? If so there might be some restriction coded in the program for upload by authorized user id which colud be maintained in any Ztable. Please check and come back. If my understanding is wrong please eleborate your requirement.
Thanks & Regards,
Ramagiri -
Problem in populating the new field from the extract structure. Kindly help
my requirement a new text field is added on R/3 side and I have to populate
the same field into BW.
In the R/3 a new customization table 'AAA' is created which will have
code - char 3 and
text - char 30.
The code field is added to a table BBB.
The SAP standard generic data source exracts data from the table BBB where in the new code field have been added.
Now I can the see the code field in the extract structure and not in the data source as the filed has selection value 'A' when checked in the ROOSFIELD table.
To populate the value in BW, I will be creating a Generic Master Data text wherein I fetch the values from the table 'AAA' which the fields code and text and replicate the same in BW.
In the reporting level, the code InfoObject will be selected as display both KEY and TeXT, by doing I can populate the values of TEXT in the reporting.
But to achieve the same I need to add the field code in the ODS but cannot do the same because I am not able to see the field code in the data source.
Kindly let me know how to achieve the same.
Also let me know if there is any alternate solution to populate the text field in BW.
Any Inputs will be appreciated.
Thanks> You should get the userdatasources bound to the
> columns and assign the values of the recordset to
> each one and after that use "setLineData" to write in
> the matrix.
>
> hope it helps
Hi all,
i have created tables (non BO Tables) directly on the SQL-server and want to use recordset to populate a user form matrix.
Is there any workaround to achieve this using non BO tables?
Please provide some sample code since it is a very urgent matter.
regards
Daniel -
Update-changed-fields-only tag
I have a problem using the "update-changed-fields-only" tag in oc4j v 9.0.2.0.0:
I set it on true but it still make the update on ALL the entity fields :(
This is a real problem when I made independent changes on different fields of the same record in one method using different instances of a entity bean: the container makes a final update on ALL the fields losing changes I previousely made in the method.
Is there a way to avoid this?
ThanksValentin -- This is the first I heard of this happening. Can you send a simple test case (including source) to [email protected] and I will take a look at it?
Thanks -- Jeff -
Problem while populating a field on process form- Values truncated
Hi,
I am facing a strange problem.
I have a requirement to populate Country field on AD process form based on the value of country code on the same process form which should eventually go to 'co' attribute in AD. So for eg. if the Country Code has value- 'US' then the Country field should be populated with 'United States'. This value is picked from lookup- Lookup.Locations.Country.
My adapter code works perfectly fine (checked using sysouts) it gets the proper values from the lookup but the country filed gets populated only with partial value. So instead of United States it only shows 'UNIT'. Same is for any country having more than 4 charatcters. It truncates the rest of the string and populates the field with only first 4 characters. I tried manually populating the Country field with complete country name on the process form and it works fine and the same value goes to AD also but when I run the adapter it only populates it with 4 charactetrs.
This is strange and I have no clue what could be stopping it. Any idea/experiences?
Thanks in advance,
-AbhiHi Abhi,
Can you tell me how you have implemented populating an UDF based on Prepopulation of another UDF. I have a similar kind of requirement. It would be great if you share your code or relevant part of it.
Regards,
Sunny Ajmera -
Alv output to Excel with numeric fields as numeric fields only and not char
Hi,
When we download the alv output to excel format in the locat file using the toolbar button provided in the ALV, the numeric fields get converted to character format. Is there any other way or settings in ALV so that the numeric fields will be get saved as numeric fields only and not character?
Rgds,
MAdhuriany idea for above problem is welcome
-
Problem in populating field of same name in main & sub screen
Hi Guys,
I have a problem in my BDC program where the same field name appear in main screen and subscreen. Everytime i run the BDC program it will only populate to the field in main screen but not in the subscreen.
Below are the result of my BDC recording: Where PKHD-LGNUM, PKHD-LGTYP and PKHD-LGPLA exist in main screen 0110 and also sub screen.
SAPMMPKR 0110 X
BDC_OKCODE =SAVE
<b><i> PKHD-LGPLA KB
PKHD-LGNUM 100
PKHD-LGTYP 150</i></b>
PKHD-BEHAZ 10
PKHD-SIGAZ 8
PKHD-BEHMG 50
BDC_SUBSCR SAPMMPKR 0813INCLUDE8XX
PKHD-UMLGO S020
<b><i> PKHD-LGNUM 100
PKHD-LGTYP 150
PKHD-LGPLA KB</i></b>
BDC_SUBSCR SAPMMPKR 0820INCLUDE820
BDC_CURSOR PKHD-KOSTL
PKHD-KOSTL 8441
BDC_SUBSCR SAPMMPKR 0830INCLUDE830
This is the actual extract from SAP standard recording program, i even re-run the recording and it is not able to populate the value back into the subscreen fields of the same.
Any one encounter the same problem and solve it? please help me please.
Many thanks,
JayThe transaction i'm dealing with is PK01, control cycle creation. There is a screen where we specified the control cycle data and there is a subscreen to specify stock transfer location. Problem when both these main and subscreen have fields tied to the same name and structure.
If the screen fields name are the same, logically the BDC suppose to populate both field at the same time, however in my case the BDC only populate to the one in the main screen while the fields in subscreen are left empty. I have tried to specify the subscreen before populating the screen field, the value just won;t go in. I suspect it is still the problem in specifying the subscreen in populating the BDCDATA. I just dont know how, i have tried every possible way of specifying the subscreen. -
I have a fillable form that is used by everyone in the office. When the fields are filled we print using the form fields only option to print on our invoices. When I go to print it in Acrobat XI standard using the form fields only option, none of the information I filled shows up or prints. No one else in the office has this problem. Does anyone know why I can't do this, but other people can?
I have a fillable form that is used by everyone in the office. When the fields are filled we print using the form fields only option to print on our invoices. When I go to print it in Acrobat XI standard using the form fields only option, none of the information I filled shows up or prints. No one else in the office has this problem. Does anyone know why I can't do this, but other people can?
-
Facing problems while mapping fields in LSMW.
Hi Friends,
i got a requirement to upload the address. Address is in
flat file.requirement is to use LSMW with object 0602 and the
standard report program is RSADRLSM02.This standard report
program uses the structures for uploading are ADR_LSM0 to
ADR_LSM6.But i have some fields in the source structure are
not at all related to the fields in destination structure(i.e ADR_LSM0 to ADR_LSM6)therefore i am facing problem while
mapping the source and destination fields.is there any other
way to map the fields.Please help me it's very urgent.
Thanks in advance.
Regards,
Sumiti Gupta.Thanks for the reply santosh.
GIS FIELD SAP LOCATION
ADDR_GID(10char) EXADR-KUNNR
STR_NO(10) ADR_LSM0-STRT_CODE
STR_NAME (42) ADR_LSM0-STREET
ADDRESS_UNIT(7) ADR_LSM0-HOUSENUM_H
and
ADR_LSM0-HOUSENUM_L
ADDRESS_UNIT_TYPE(5) EVBSD-VBSART
POST_CODE (10) ADR_LSM0-POST_CODE
MUNI_NAME (40) EXADR-APPLDATA
MAILING_CITY(60) ADR_LSM0-CITY_NAME
MAP_PAGE(4) EADRSTRTGRID_GRID_ID
EVAC_ZONE(1) EVBSD-ZEVAC
PIN_NUM (18) EHAUD-PLTXT
in the above fields the structure with ADR_LSM0 are found with the other fields i m not able to find the similar fields in the destination structure.Please help me.
Regards,
Sumiti Gupta. -
Hi all
In the component overview screen of CO01 I want to disable all the field in screen of table control.I want to make it as output screen only.
Thanks & Regards,
Rajib.Isn't that just exactly what transaction CO02 does? CO01 is for creating production orders so what sense does it make to have it display mode only?
Maybe your goal is to stop then end user changing the component assignment that is automatically detected by the system. If so, personally I think a better starting point would be PP configuration or user authorizations rather than looking to change the screen by whatever method. As we don't know what you are trying to achieve it's hard to offer much more advice maybe all you need is to change transaction to CO02 -
Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .
Hi Chhayank,
the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
~Florian -
Facing problem while downloading ALV grid Output into Excel
Hi Guys,
I am facing problem while downloading ALV grid Output into Excel.
It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
Can someone help me regarding this
thanks for your helpHi,
Open up Excel on your desktop. Goto Tools > Macro > Security.
Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
Was this your problem? Don't forget those points, either.
check with this wetther it is solved or not.
Regards,
sana. -
Problem with adding output field in Bank Details(Infotype 0009)
Hi All,
I hav a criteria like, when i select a value for a field corresponding value should be displayed in input/output field just beside the selected field.
To make you understand the criteria more clearly.In infotype 0009 we hav Bank key.When we select a bank key corresponding Bank name is displayed just beside Bank key field.How to achieve that functionality.
Can anyone help please. Its urgent...
Thanks a lot...
Sandeep.To make my question more clear.I have created a new field in bank details infotype.Similar to the field Bank key in 0009 Infotype.As soon as a select the Bank no through F4 functionality i want the Bank no no to be selected and at the same time i want Bank name to be displayed just beside this field.
In short with 1 selection i want both Bank no n Bank name to be selected.
If i hav ti write the code where should i write the code.I hav also created a structure .I presume i need to write a logic for this requirement.But i dont know where to write the logic.
Maybe you are looking for
-
Appending Objects to a File using serialization
hi, I was wondering if I can append objects in a single file. For example, suppose there are 2 .java files. 1st file creates the Serialized file caleed sl.dat, opens it, writes the object, close it down. The 2nd file nw open that same file, sl.dat, i
-
Aggregation tab disabled for fx logical columns
Hello, I am new to OBIEE. Can somebody please help me understand the folowing - Query - While defining formula column in BMM whenver we use logical column as source why Aggregation Rule tab gets disable? How can i apply aggregation rule for such colu
-
I am unable to connect to wifi since last iPhone upgrade
I am unable to connect my iphone 4s to wi-fi since the latest upgrage! I have called Verizon and they say it's an Apple problem that alot of people are having and looking at the posts, I can see that's true. Will there be any fix for this??? When I
-
Adobe Premiere Pro CS4 has unexpectedly quit
I just installed the trial to adobe premiere pro cs4. Once I start it, and it's about to load it crashes and I get a window that says "adobe has detected that the application adobe premiere pro cs4 has unexpectedly quit". I reinstalled it but the sam
-
Developing without Full client / tnsnames.ora
I am trying to develop an OCI application using Borland C++ Builder. I want to deploy and develop using Instant Client 10G without tnsnames.ora file. I have 2 PCs - NT4 & XP. On the NT4 PC I had installed the full Oracle Client and was using the tnsn