Screen Exit QS21(Create Inspection characteristic master)
Hi All,
Does anybody know some screen exit in QS21 T-CODE? I need to add some z fields at QPMK(Inspection characteristic master) table and I need to reflex those fields in QS21 t-code. Any suggestion?
Thanks in advance.
Regards...
Dear,
Follow these steps,
Go to Transaction SFAW: module pool SAPMQSDA, screen group QUAN, function 'Modified fields', 'Change'
On the following dialog box, enter the field QPMK.
Choose 'Enter'.
Place the cursor on the field QMKST-TOLERUNTEN and choose "Copy reference".
Choose 'Enter'.
Choose 'Generate screens'.
Transaction SFAW: module pool SAPMQSDA, screen group QUAN, function 'Modified fields', 'Change'
On the following dialog box, enter the field say QPMK-TOLERWBIS.
Choose 'Enter'.
Place the cursor on the field QMKST-TOLEROBEN and choose "Copy reference".
And add filed wat you want.
Save your chhanges.
Regards,
R.Brahmankar
Similar Messages
-
User exit for creating/deleting vendor master
Hello Gurus,
I have this task that to update this customized transaction we have for the certification list of the vendors. What they want is every time that there is new vendor master to be created or deleted in XK01, the customized transaction we have for the certification list of the vendors should be updated. I am thinking to suggest link the table LFB1 and LFA1 to the custo tcode we have to satisfy the business needs. Or any other suggestions? What are the user exits that can be use and link the creation /deletion vendors to my customized program? Technical team is asking for the user exits but not aware of them
Thanks!We have this customized tcode where we input the vendor and materialu2019s expiration date manually. Then client wants to enhance that custo tcode with features when creating and deleting vendor in XK01 transaction, the new vendors data will also be automatically updated the custo tcode we have before. Its like everytime there is new vendor created, the custo tcode we have before will be updated with the new vendor data(not automatically input) then if the vendor is deleted, the vendor entry in the custo tcode we have before will also be deleted.
I found the user exit SAPMF02K but according to the technical team it is not applicable to our issue. Any suggestions or comments or other user exit that we can use to develop this new request wanted by the client?
Thanks! -
Need Screen Exit in "Create Trip" Screen of Tcode TRIP.
Hi,
Here i want to develop a screen in "CreateTrip" of TCode TRIP.
Any suggestions are welcome.
Thanks in Adv,
Raju MummidiHi ,
Try to use this user exit.
Use User Exit: FITR0003
Thanks,
Mohan rao -
Inspection Characteristic in the material master (Classification)
Dear All,
Please anyone tell me the cycle for maintaining the characteristics in the material master (classification tab) using batch classification.
or give me a link for the same.
regards,
RishabhHi Rishab,
Below links can help you
http://help.sap.com/saphelp_470/helpdata/en/4d/2b8bd043ad11d189410000e829fbbd/content.htm
http://scn.sap.com/thread/1783839
http://help.sap.com/saphelp_470/helpdata/en/2d/350a19448c11d189420000e829fbbd/content.htm
http://scn.sap.com/thread/2046143
http://help.sap.com/saphelp_46c/helpdata/en/2d/350a19448c11d189420000e829fbbd/content.htm
below steps will help
Creation of Batch Class in (CL01)
Assignment of above created classed characteristic to the Batch Class at the time of class creation. (CL01)
Assignment of batch class to material master in classification view. (MM01)
Creation of MIC with reference to above created Class characteristic (QS21)
Creation of inspection plan with above MIC (QP01)
Follow your business process cycle for creation of inspection lot
Result recording and usage decision (QA32)
You can see in MSC2N that batch characteristic will get updated.
Best regards,
Sharat -
How can copy master inspection characteristic from plant1 to plant2
Now I have 2 plants
I already created all master inspection characteristic that i need by QS21 for plant1
Is there any way I can copy all master inspection characteristic from plant1 to plant2 ?i'm creating inspection plan( QP01 ) for material , but all the materials & plans are in plant 2 (ss03)
now i have to assign MIC to inspection plan , i only can select MIC of plant 1 ,and plant text would show"plant 1" ....
so i want to create the same MIS for plant 2 , is there any way i can mass copy MIC from plant 1 to plant 2 ? -
Someone has a tutorial for creating screen exit?
I have a development and I do not know how to create screen exit.
Case Someone has a tutorial for creating screen exit please help me
Thank you
<b><i>Wagner Duarte
Consultant - SAP ABAP</i></b>hI
Screen Exit is nothing but enhancing the screen like creating some more fields, subscreen and so on.
1. Go to the screen>System>Status-->Program (Double
click this program. It will take you to the program.
2. Now, Goto-->Object Directory Entry.
3. Make a note the package name.
4. Now run the transactions SMOD, press F4 and enter the
above noted package, press enter.
5. It will display list of Exits.
6. Now go back to the initial screen SMOD.
7. Specify the exit name here and select the radio button
Components.
8. It will display four group boxes one for FM, second
for Fcodes, thrid for Screen areas and last for
includes.
9. Goto transaction CMOD, create a new project, and
click the button "Enhancement assignments" and
specify your enhancements that you got in SMOD.
10. Now bouble clikc the enhancement, it will take you to editor with some includes starting with Z, double clikc the include you want to edit and proceed.
Have a look at below link It will definately help you to undestand the same.
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
check these links.
http://help.sap.com/saphelp_46c/helpdata/en/c8/1975e643b111d1896f0000e8322d00/frameset.htm
http://www.allsaplinks.com/screen_exit.html
USER EXITS
https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=312792
https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=1320078
https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=2669896
How to implement screen exit for a SAP standard transaction
Introduction
SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
To pave way for this, SAP has provided the option for screen exits. Usually, SAP provides the following:
An append structure in the database table with the new fields.
A subscreen area into the standard screen where the programmer can attach his subscreen of his own program with the new fields.
A function group under which the new subscreen has to be created with the new fields.
Function exits to synchronize the PBO and PAI of the standard SAP program with the PBO and PAI of the subscreen so that data can flow back and forth between the standard SAP program and the program written by the developer for the subscreen. These function modules also exist in the same function group under which the subscreen will have to be developed.
Finally, a linkage has to be done between the subscreen area of standard SAP screen with the custom subscreen constructed by the developer.
Typically, SAP provides an enhancement in which the developer can create an append structure, use the function exits to synchronize the PBO and PAI of the standard SAP program and the custom subscreen program, and make the necessary linking( as mentioned above in step 4. But, again, this is not a hard and fast rule. Linking in some case, is also done by configurations.) SAP also usually provides the name of the function group under which the subscreen has to be developed.
Necessary guidance about implementing a screen exit development is usually available in the Documentation section of the enhancement ( can be availed by transaction SMOD).
Pre-Requisites
The developer to work on screen exit should have essential knowledge on the following:
DDIC concepts, including the knowledge of append structure.
Concept of SAP Enhancements and implementing them using Projects.
Concept of function exits.
Knowledge on Module Pool including subscreens, Tabstrip controls etc.
Steps
Guidelines
So, a developer can follow the guidelines mentioned below to implement a screen exit to a standard SAP transaction, as and when required:
Find out the Required Enhancements
Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton SAP Applications. A list will appear that contains information on all the enhancements, categorized under functional areas. Developer must search for the enhancements relevant to his functional area of interest for e.g., Purchasing, Asset Accounting, etc.
Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
Utilize the Enhancement in a Project
After you have found one, do as directed in the documentation. Generally, the steps are as follows:
Create a project using CMOD including your enhancement.
Create the append structure with new fields.
Go to the desired function group and create a subscreen with the new fields. Write PBO and PAI for the subscreen, if required.
Use the function exits in the enhancement to link the PBO and PAI of the subscreen with that of the main SAP program supporting the SAP transaction.
Maintain necessary linkage between the subscreen area of standard SAP program with the custom subscreen developed along with the custom program name. This can be done in the project (developed by CMOD including the enhancement) or outside as a part of configuration.
Activate the project.
Test to ensure that required functionality are met.
Case Study 1
Add three new custom fields for Asset master and maintain information for them
Requirement
Three fields in the legacy system have to be maintained in Asset master. These fields are:
Original Asset number 20 characters
Location 2 15 Characters.
Model no 20 characters
Location 2 should start with L.
Pre-Analysis
Finding out the Enhancement
As described above, the enhancement is determined. It was found, that enhancement AIST0002 will serve the purpose. It contains the following components (can be viewed by transaction SMOD):
Exit Type Description EXIT_SAPL1022_001 Function Exit Check of User-Defined Fields when Using Create and Change BAPI EXIT_SAPLAIST_002 Function Exit Transfer Data for User Subscreens in PBO. EXIT_SAPLAIST_003 Function Exit Transfer of User-Defined Fields to SAP Master Data Transactions CI_ANLU Customizing Include Include structure to add new fields
Studying the Function Exits
The function module level documentation for the function exits are then viewed from transaction SE37. The documentation clearly laid out for the purpose for their use:
EXIT_SAPLAIST_002
Function module Level Documentation
This function module is called by asset master data maintenance at the start of the dialog. (When changing, it is called after reading of the data from the database; when creating it is called after the transfer of the default values from the asset class and reference asset.) The purpose of the function module is to enable this function group to recognize the master data. For interpreting or controlling master data fields that are important for user fields, it is possible to transfer to global variables at this point, so that they can be recognized when the user subscreens are processed.
Import Parameters
Understanding
This function module is called at the PBO to pass the information retrieved from the database to pass them to the custom subscreen and its underlying program. Import parameter : I_ANLU will be populated with the values for user-defined fields which will be passed to the subscreen program. So, there must be some sort of variable assignment from I_ANLU.
EXIT_SAPLAIST_003
Function module Documentation: This function module is called by SAP asset master data maintenance after the screens are processed, but before saving. The purpose of the function module is to transfer fields entered on user sub-screens of SAP asset data maintenance to the database for updating. The export parameter for this function module is:
Understanding
This function module will be used to transfer the user entered data in the subscreen fields to the main SAP program, which will then be saved into the database.
Studying the Documentation of the Enhancement
The enhancement documentation (as is viewed from the initial screen of SMOD] also supports the idea. Moreover, it informs that we need to develop a subscreen under function group XAIS. This is the function group under which the two function exit modules also exist. So, if the custom subscreen refers to the global data of the function group XAIS, then those values will also be available to these function exits as well.
Going to SE80 and viewing the function group XAIS helps us to inform that there are three DDIC tables declared for it:
Deciding the Final course of Action
After making all the investigations, the final course of action was determined.
SrlNo Step Justification
A project has to be created using transaction CMOD where the enhancement AIST0002 will be included.
Customizing include CI_ANLU has to be created with the custom fields demanded When CI_ANLU will be developed, the custom fields will get appended to the database table ANLU. Also, these fields will be used to create screen fields in the new subscreen.
A custom subscreen, say, 9000 will be developed under function group XAIS. The screen group for the screen will be CUST (or any name). The three custom fields added to table ANLU (by creating CI_ANLU) will be used to create new fields in the screen.
In the PAI of the subscreen, validation for Location to start with L will be added. The subscreen with three new fields has to be developed so that it can be attached to a subscreen area of the asset master screens.
In the custom include of the function exit module EXIT_SAPLAIST_002, the following code will be written:-
ANLU = I_ANLU. I_ANLU is the import parameter of this FM. The value is assigned to the global variable ANLU, referring which the three new subscreen fields are developed. So, data retrieved from database table ANLU will be passed to this FM as I_ANLU by the standard SAP main program. The value will be taken and passed to the global variable of the function group XAIS, so that the three custom fields (referring to ANLU of XAIS) get populated.
In the custom include of the function exit module EXIT_SAPLAIST_003, the following code will be written:-
E_ANLU = ANLU. The changed values in the subscreen fields exist in global variable ANLU for the function group XAIS. This function exit module will pass the data back to the SAP main program as E_ANLU.
Proper linkage/configuration has to be done so that the new subscreens get linked to the appropriate subscreen area of the Asset master screen. This has to be done otherwise, the new custom subscreen will not be displayed in the Asset master screens.
Development
Creating a Project to include the enhancement
Go to transaction CMOD and create a project.
Enter a description for the project. Then, click on the pushbutton Enhancement Assignments in the Application Toolbar.
Enter the name of the enhancement and Save.
Go to Components.
Creating Custom Include for ANLU
The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.
Create the include structure with three new fields, as required. Then, save and activate it.
Develop the subscreen and the program
Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.
Create it as subscreen.
Then, go to the Layout of the screen and create three new fields from Database table ANLU.
Drag the fields in the screen body and place them.
Then, save and activate the screen and come back to screen flow editor.
Create the PAI module to add validation for field Location 2, as required .
Activate the whole function group and come out.
Write code in the Function Exits to synchronize the programs
Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.
Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:
Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.
Then, activate everything the whole project and come out.
Complete the configuration to link the subscreen
The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.
Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.
Here, the requirement is to create these three custom fields in the tab page General of asset master screen ( AS01/AS02/AS03/AS91).
Determine the Layout
To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class 1000 and click on folder General Assignment of Layout.
Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout SAP cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.
Create new tab layout
Go to transaction AOLA. Copy the tab layout SAP to create another layout, say, YSUB.
System will copy all the settings and will inform you about that.
Select your newly created layout and double-click on the folder Tab page titles.
You want to put your custom fields in the tab page General. So, select this tab page entry and double-click on the folder "Position of Groups".
Here, all the field groups currently residing in the tab-page General are shown. Add an entry for your newly created fields.
Select the group box from the list. An entry will come with U padded with the custom subscreen prepared by you.
Then, save and come out.
Assign the new Layout to Asset Class
Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.
Save and come out.
Test the Exit
Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to them save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not.
Original Source: ittoolbox.com
Screen Exit is nothing but enhancing the screen like creating some more fields, subscreen and so on.
1. Go to the screen>System>Status-->Program (Double
click this program. It will take you to the program.
2. Now, Goto-->Object Directory Entry.
3. Make a note the package name.
4. Now run the transactions SMOD, press F4 and enter the
above noted package, press enter.
5. It will display list of Exits.
6. Now go back to the initial screen SMOD.
7. Specify the exit name here and select the radio button
Components.
8. It will display four group boxes one for FM, second
for Fcodes, thrid for Screen areas and last for
includes.
9. Goto transaction CMOD, create a new project, and
click the button "Enhancement assignments" and
specify your enhancements that you got in SMOD.
10. Now bouble clikc the enhancement, it will take you to editor with some includes starting with Z, double clikc the include you want to edit and proceed.
and you just go through these links also
Screen exit
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
screen-exits
Check the following link.
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=how%20to%20find%20screen%20exits&cat=sdn_all -
Screen Exit for Customer Master
Hi All,
How to create screen exits for Customer Master ( XD01 Tcode). Please give step by step procedure.
For useful answers points willbe rewarded.Hi sathyaa,
Please Refer this,
https://forums.sdn.sap.com/click.jspa?searchID=5279713&messageID=3080834
Thanks. -
Screen exit in SAPMF02D screen number 7000 (xd01) customer master
Hi friends,
i need to add one custom field in customer master(xd01) screen number 7000. is there any screen exits for that? or how can we add a custom field in screen?. plz tell me the steps for that. The additional field which i have to add is, comes under sales area data Tab - billing document tab - billing document.
Message was edited by:
venkata kumarwith in same condition i m facing the same problem if you already have any sollution plz suggest me.
waiting for your kind reply -
Screen Exit in Tcode COR1 - Create Process Order
Hi All,
Can anyone let me know if there is a screen exit or a BADI where in i can use it to extend the COR1 general data tab to include a field.
Even if i can add a additional tab in COR1 tcode through a BADI, will be good.
Please help.
Thanks,
Jaffer Ali.SHi,
STEP1:- Add Z-Fiels in Structure CAUFVD & Table: AUFK using (Goto --> Append Structure)
Step1. T-code: CMOD
STEP2: Enter project name: Zxxxxx --> Create
STEP3: Enter Short text -- > Click Enhancement Assignment
STEP4: Enter Enhancement: PPCO0001 & PPCO0020
STEP5: Click on Components
STEP6.1: double click on Screen-Exit: SAPLCOKO (Screen no: 5900)
A) Add Z-fileds in SCreen layout with keyp of structure :CAUFVD
Screen FLOW LOGIC:-
Process before output.
PROCESS BEFORE OUTPUT.
Set the screen status
Screen modifications incase of Display
MODULE screen_display.
Process after input.
PROCESS AFTER INPUT.
Screen fields and its processing.
CHAIN.
FIELD: caufvd-z_cust1,
caufvd-z_cust2,
caufvd-z_cust3,
caufvd-z_cust4,
caufvd-z_cust5,
caufvd-z_qty1,
caufvd-z_qty2,
caufvd-z_qty3,
caufvd-z_qty4,
caufvd-z_qty5.
MODULE header_update.
ENDCHAIN.
FIELD: z_total.
MODULE disp_data.
Update the header.
Not required as of now.
module screen_display output.
Disable input in case of display.
if sy-tcode = 'COR3'.
loop at screen.
screen-input = 0.
modify screen.
endloop.
endif.
endmodule. " screen_display OUTPUT
module header_update input.
check not sy-tcode = 'COR3'.
perform data_check using caufvd.
endmodule. " HEADER_UPDATE INPUT
*Validate screen input fiels
form data_check using p_caufvd structure caufvd.
data: l_v_count type i.
get parameter id 'MAT' field p_caufvd-matnr.
if p_caufvd-z_cust1 is initial and p_caufvd-z_qty1 is initial and
p_caufvd-z_cust2 is initial and p_caufvd-z_qty2 is initial and
p_caufvd-z_cust3 is initial and p_caufvd-z_qty3 is initial and
p_caufvd-z_cust4 is initial and p_caufvd-z_qty4 is initial and
p_caufvd-z_cust5 is initial and p_caufvd-z_qty5 is initial.
else.
if not p_caufvd-z_cust1 is initial
and not p_caufvd-z_qty1 is initial.
select single count(*) into l_v_count from zcc_t01
where z_custmat = p_caufvd-z_cust1 and
matnr = p_caufvd-matnr.
if l_v_count < 1.
message e000(zpp) with 'Entered customer does not exist'.
endif.
clear l_v_count.
else.
message e000(zpp) with 'Fill both customer material and Qty'.
endif.
if not p_caufvd-z_cust2 is initial
and not p_caufvd-z_qty2 is initial.
select single count(*) into l_v_count from zcc_t01
where z_custmat = p_caufvd-z_cust2 and
matnr = p_caufvd-matnr.
if l_v_count < 1.
message e000(zpp) with 'Entered customer does not exist'.
endif.
clear l_v_count.
elseif
not ( p_caufvd-z_cust2 is initial and p_caufvd-z_qty2 is initial ).
message e000(zpp) with 'Fill both customer material and Qty'.
endif.
if not p_caufvd-z_cust3 is initial
and not p_caufvd-z_qty3 is initial.
select single count(*) into l_v_count from zcc_t01
where z_custmat = p_caufvd-z_cust3 and
matnr = p_caufvd-matnr.
if l_v_count < 1.
message e000(zpp) with 'Entered customer does not exist'.
endif.
clear l_v_count.
elseif
not ( p_caufvd-z_cust3 is initial and p_caufvd-z_qty3 is initial ).
message e000(zpp) with 'Fill both customer material and Qty'.
endif.
if not p_caufvd-z_cust4 is initial
and not p_caufvd-z_qty4 is initial.
select single count(*) into l_v_count from zcc_t01
where z_custmat = p_caufvd-z_cust4 and
matnr = p_caufvd-matnr.
if l_v_count < 1.
message e000(zpp) with 'Entered customer does not exist'.
endif.
clear l_v_count.
elseif
not ( p_caufvd-z_cust4 is initial and p_caufvd-z_qty4 is initial ).
message e000(zpp) with 'Fill both customer material and Qty'.
endif.
if not p_caufvd-z_cust5 is initial
and not p_caufvd-z_qty5 is initial.
select single count(*) into l_v_count from zcc_t01
where z_custmat = p_caufvd-z_cust5 and
matnr = p_caufvd-matnr.
if l_v_count < 1.
message e000(zpp) with 'Entered customer does not exist'.
endif.
clear l_v_count.
elseif
not ( p_caufvd-z_cust5 is initial and p_caufvd-z_qty5 is initial ).
message e000(zpp) with 'Fill both customer material and Qty'.
endif.
endif.
endform. " Data_check
STEP7:-Double click on Function Exit:EXIT_SAPLCOKO_005
Doouble click on include program: ZXCO1U21 and careae and add below code in include program
Data declarations
TYPES: BEGIN OF l_ty_zqty,
z_custmat TYPE zcc_t01-z_custmat,
z_qty TYPE zcc_t01-z_qty,
END OF l_ty_zqty.
DATA: l_s_zqty TYPE l_ty_zqty,
l_t_zqty LIKE STANDARD TABLE OF l_s_zqty,
l_v_frac TYPE zcc_t01-z_qty,
l_v_four TYPE f VALUE '0.4'.
SET PARAMETER ID 'MAT' FIELD i_caufvd-matnr.
Get the fields from ZCC_T01 and display it.
IF ( sy-tcode EQ 'COR1' OR sy-tcode EQ 'COR2' )
AND g_v_flag IS INITIAL.
IF i_caufvd-z_cust1 IS INITIAL AND
i_caufvd-z_cust2 IS INITIAL AND
i_caufvd-z_cust3 IS INITIAL AND
i_caufvd-z_cust4 IS INITIAL AND
i_caufvd-z_cust5 IS INITIAL.
SELECT z_custmat z_qty INTO TABLE l_t_zqty FROM zcc_t01
WHERE matnr = i_caufvd-matnr
AND z_qty NE space
AND z_qty NE '0'.
CHECK sy-subrc = 0.
LOOP AT l_t_zqty INTO l_s_zqty.
CASE sy-tabix.
WHEN 1.
caufvd-z_cust1 = l_s_zqty-z_custmat.
caufvd-z_qty1 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
COMPUTE l_v_frac = FRAC( caufvd-z_qty1 ).
IF l_v_frac > l_v_four.
COMPUTE caufvd-z_qty1 = CEIL( caufvd-z_qty1 ).
ELSE.
COMPUTE caufvd-z_qty1 = FLOOR( caufvd-z_qty1 ).
ENDIF.
CLEAR l_v_frac.
WHEN 2.
caufvd-z_cust2 = l_s_zqty-z_custmat.
caufvd-z_qty2 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
COMPUTE l_v_frac = FRAC( caufvd-z_qty2 ).
IF l_v_frac > l_v_four.
COMPUTE caufvd-z_qty2 = CEIL( caufvd-z_qty2 ).
ELSE.
COMPUTE caufvd-z_qty2 = FLOOR( caufvd-z_qty2 ).
ENDIF.
CLEAR l_v_frac.
WHEN 3.
caufvd-z_cust3 = l_s_zqty-z_custmat.
caufvd-z_qty3 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
COMPUTE l_v_frac = FRAC( caufvd-z_qty3 ).
IF l_v_frac > l_v_four.
COMPUTE caufvd-z_qty3 = CEIL( caufvd-z_qty3 ).
ELSE.
COMPUTE caufvd-z_qty3 = FLOOR( caufvd-z_qty3 ).
ENDIF.
CLEAR l_v_frac.
WHEN 4.
caufvd-z_cust4 = l_s_zqty-z_custmat.
caufvd-z_qty4 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
COMPUTE l_v_frac = FRAC( caufvd-z_qty4 ).
IF l_v_frac > l_v_four.
COMPUTE caufvd-z_qty4 = CEIL( caufvd-z_qty4 ).
ELSE.
COMPUTE caufvd-z_qty4 = FLOOR( caufvd-z_qty4 ).
ENDIF.
CLEAR l_v_frac.
WHEN 5.
caufvd-z_cust5 = l_s_zqty-z_custmat.
caufvd-z_qty5 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
COMPUTE l_v_frac = FRAC( caufvd-z_qty5 ).
IF l_v_frac > l_v_four.
COMPUTE caufvd-z_qty5 = CEIL( caufvd-z_qty5 ).
ELSE.
COMPUTE caufvd-z_qty5 = FLOOR( caufvd-z_qty5 ).
ENDIF.
CLEAR l_v_frac.
WHEN OTHERS.
ENDCASE.
ENDLOOP.
g_v_flag = 'X'.
ENDIF.
IF g_v_flag IS INITIAL AND sy-tcode = 'COR2'.
MOVE-CORRESPONDING i_caufvd TO caufvd.
ENDIF.
ELSE.
MOVE-CORRESPONDING i_caufvd TO caufvd.
ENDIF.
STEP8:- Double click EXIT_SAPLCOKO_006
Doouble click on include program: ZXCO1U17 and careae and add below code in include program
Data Declaration.
tables : caufvd.
Export the fields.
move-corresponding caufvd to e_coci_aufk.
hope this help...
Regards
Sudheer Madisetty -
Vendor Master (XK01) Screen Exit
Hi,
Can you please help me how to add extra screen fields to standard screen i.e.,vendor master (XK01) screen.
Is there any screen exit for XK01 ? OR
Is there any BADI'S for XK01 screen exit ?
Bye
Praveen.I am looking for a way to use the Vendor Maintenance Program SAPMF02K (XK01/XK02/XK03) to update custom LFM2 fields.
Since there are multiple LFM2 plant(WERKS) Records for a Vendor/Purchasing Org, How can the screen be configured to narrow in on the desired LFM2 record to update?
Goal-Have the additional field appear on the SAPMF02K vendor plant purchasing data screen (330) or as separate button on the alternative data plant screen (341).
Presently I can prompt for the plant and update the existing record, however this is not useful in view mode as the plant field is read only. It also does not look/feel like SAP's XK0x transactions.
Following SAP Note 580266 I was able to use VENDOR_ADD_DATA and VENDOR_ADD_DATA_CS use the custom screen. -
How to create table control and link in screen exit
Hi Friends,
I want to create table control in enhancement CONFPP07. The values entered in table control should be stored in ztable along with some other information.
But I want to know how to create table control in screen-exit and how and where to write code and how to link all.
Kindly send me step-by-step documentation or real time examble prg.
Kindly give ur answers for this problem only.
Thanks in Advance,
S.Senthil kumarIf u have a screen exit..then u will have a option to create a sub screen..in that sub screen u activate the pai and pbo events..it will show u where to write the code..
-
Screen Exit for MI01 and LI01N
Hi,
I need a screen exit for MI01 and LI01N. Please reply ASAPHi Nishu,
For MI01 below are the exits:-
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MB_CF001 Customer function exit for update of material document
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read From RESB and RKPF For Print List in MB26
MBCFC003 Maintenance of batch master data for goods movements
MBCFC004 Maintenance of batch specifications for goods movements
For LI01N :-
MWM2S001 Exit to Determine 2-Step Picking Characteristic
MWMBAP01 Enhancement for BAPI WarehouseTransOrder.GetDetail
MWMBAP02 Enhancement for BAPI WarehouseStock.GetDetail
MWMD0001 Transfer order print via RLVSDR40
MWMD0002 Transfer order print as multiple process with RLKOMM40
MWMIDI07 Enhancement for Output WMPIHU (Create Pick-HU) Inbound
MWMIDO11 Enhancement for message WMTORD: TO with several items
MWMIDO12 Enhancement for Output WMPIHU (Pick-HUs) Outbound
MWMIDO13 Extension for WMMBXY (subsequent tasks after goods movement)
MWMPP001 Enhancement WM/PP Interface (automatic TR generation)
MWMRF001 RF: Influence Display of material description
MWMRF100 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0100)
MWMRF101 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0101)
MWMRF102 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0102)
MWMRF104 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0104)
MWMRF105 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0105)
MWMRF106 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0106)
MWMRF107 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0107)
MWMRF108 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0108)
MWMRF151 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0151)
MWMRF152 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0152)
MWMRF153 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0153)
MWMRF170 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0170)
MWMRF202 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0202)
MWMRF203 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0203)
MWMRF204 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0204)
MWMRF205 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0205)
MWMRF212 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0212)
MWMRF213 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0213)
MWMRF221 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0221)
MWMRF302 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0302)
MWMRF303 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0303)
MWMRF304 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0304)
MWMRF305 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0305)
MWMRF312 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0312)
MWMRF313 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0313)
MWMRF321 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0321)
MWMRF400 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0400)
MWMRF402 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0402)
MWMRF403 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0403)
MWMRF404 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0404)
MWMRF405 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0405)
MWMRF406 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0406)
MWMRF410 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0410)
MWMRF411 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0411
MWMRF412 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0412)
MWMRF502 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0502)
MWMRF503 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0503)
MWMRF504 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0504)
MWMRF505 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0505)
MWMRF600 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0600)
MWMRF601 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0601)
MWMRF630 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0630)
MWMRF631 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0631)
MWMRF632 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0632)
MWMRF633 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0633)
MWMRF634 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0634)
MWMRF650 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0650)
MWMRF651 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0651)
MWMRF700 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0700)
MWMRF701 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0701)
MWMRF702 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0700)
MWMRF703 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0703)
MWMRF704 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0704)
MWMRF705 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0705)
MWMRF760 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0760)
MWMRF761 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0761)
MWMRF762 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0762)
MWMRF763 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0763)
MWMRF764 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0764)
MWMRF765 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0765)
MWMRF766 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0766)
MWMRF767 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0767)
MWMRF768 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0768)
MWMRF769 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0769)
MWMRF777 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0777)
MWMRF800 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0800)
MWMRF801 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0801)
MWMRF802 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0802)
MWMRF803 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0803)
MWMRF804 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0804)
MWMRF805 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0805)
MWMRF806 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0806)
MWMRF807 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0807)
MWMRF888 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0888)
MWMRF889 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0202)
MWMRF998 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0998)
MWMRF999 ENHANCEMENT FOR USER SCREENS (LOGICAL SCREEN 0999)
MWMRFCOD Enhancement for function codedisabling
MWMRFDLV select delivery by user criteria
MWMRFPRT Enhancement for printing
MWMRFSSG user exit for sorting TOs in RF system-guided transaction
MWMRFUP Customer defined general purpose pushbutton called from scr.
MWMRP001 Cust. Exit for Fixed Bin Replenish.: Delivery Item Selection
MWMRP002 Cust. Exit for Fixed Bin Replenishment: TR Quantity Distr.
MWMRP003 Customer Exit for Replenishment using RLLNACH1
MWMRP004 User Exit for Replenishment using RLLNACH4
MWMTO001 Enhancements for end of transfer order generation
MWMTO010 Exit: Calculation of Total Planned TO Processing Time
MWMTO011 Correction of Planned Processing Time for TO Item
MWMTO012 Correction of Sorting and Split Transfer Order
MWMTO013 Stock Removal for Sev. Storage Types as in Stringent FIFO
MWMTOAU3 Separate selection of posting changes for autom.TO creation
MWMTR001 Exits at the end of transfer rqmnt creation (IM,PP interf.)
Choose the approriate one which suits your requirement.
Hope it helps you.
Regards
Abhii... -
QP01 - To Create Inspection Plant
Hi Associates and Consultants,
Have any one worked on T-Code QP01 to create a Inspection Plan Using BDC's or BAPI's.
If so please try to ping me.
Regards,
sgHi friend,
check the code
REPORT ZQMB_QP01_INSP_PLAN
NO STANDARD PAGE HEADING LINE-SIZE 255 MESSAGE-ID ZQMB_INSP_PLAN.
Description: Upload Program for Create Inspection Plan *
ABAP Name : ZQMB_QP01_INSP_PLAN *
Autor : Vanessa Noronha *
Type : BDC Program for QP01 Transaction. *
Module : QM *
Date : 17 January 2008 *
Transport : D01K948244 -- TR-BDC for QP01 *
Changes (internal Version: Documentation/Info on line level) *
Date Name internal Transp.No. Description *
-Version- *
D A T A D E C L A R A T I O N *
TYPES: BEGIN OF TY_TABDATA,
MATNR TYPE RC27M-MATNR, "Material No
WERKS TYPE RC27M-WERKS, "Plant
PLNNR TYPE RC271-PLNNR, "Key for Task List Group
KTEXT TYPE PLKOD-KTEXT, "Task list description
VERWE TYPE PLKOD-VERWE, "Task list usage
STATU TYPE PLKOD-STATU, "Status
SLWBEZ TYPE PLKOD-SLWBEZ, "Identification for the Inspection Point Field Combination
QPRZIEHVER TYPE PLKOD-QPRZIEHVER, "Sample-Drawing Procedure
END OF TY_TABDATA.
TYPES: BEGIN OF TY_TBCTRL1,
MATNR TYPE RC27M-MATNR, "Material No
WERKS TYPE RC27M-WERKS, "Plant
PLNNR TYPE RC271-PLNNR, "Key for Task List Group
ARBPL TYPE PLPOD-ARBPL, "Work center
STEUS TYPE PLPOD-STEUS, "Control key
LTXA1 TYPE PLPOD-LTXA1, "Operation short text
END OF TY_TBCTRL1.
TYPES: BEGIN OF TY_TBCTRL2,
MATNR TYPE RC27M-MATNR, "Material No
WERKS TYPE RC27M-WERKS, "Plant
PLNNR TYPE RC271-PLNNR, "Key for Task List Group
ARBPL TYPE PLPOD-ARBPL, "Work center
STEUS TYPE PLPOD-STEUS, "Control key
VERWMERKM TYPE PLMKB-VERWMERKM, "Master Inspection Characteristics
PMETHODE TYPE PLMKB-PMETHODE, "Inspection Method
PMTVERSION TYPE PLMKB-PMTVERSION, "Version Number of the Inspection Method
STICHPRVER TYPE PLMKB-STICHPRVER, "Sampling Procedure in Inspection Characteristic
PRUEFEINH(7)," TYPE PLMKB-PRUEFEINH,
PROBEMGEH(3)," TYPE PLMKB-PROBEMGEH,
STELLEN(3), "TYPE PLMKB-STELLEN, "Number of Places to the Right of a Decimal Point (Accuracy)
MASSEINHSW TYPE RQPAS-MASSEINHSW, "Measurement Unit in Which Quantitative Data Is Maintained
SOLLWERT TYPE QFLTP-SOLLWERT, "Target Value for a Quantitative Characteristic
TOLERANZUN TYPE QFLTP-TOLERANZUN, "Lower Specification Limit
TOLERANZOB TYPE QFLTP-TOLERANZOB, "Upper Specification Limit
END OF TY_TBCTRL2.
TYPES: BEGIN OF TY_CHECK,
MATNR TYPE RC27M-MATNR, "Material No
WERKS TYPE RC27M-WERKS, "Plant
PLNNR TYPE RC271-PLNNR, "Key for Task List Group
END OF TY_CHECK.
Declaration of the Internal Table & Work Area.
DATA: ITST_TABDATA TYPE SORTED TABLE OF TY_TABDATA WITH
UNIQUE KEY MATNR WERKS PLNNR,
" Internal table for Non-Table Control Records
WA_TABDATA TYPE TY_TABDATA,
ITST_TABCTRL1 TYPE TABLE OF TY_TBCTRL1 , " Internal table for the First Screen with Table Control
WA_TABCTRL1 TYPE TY_TBCTRL1,
ITST_TABCTRL2 TYPE TABLE OF TY_TBCTRL2, " Internal table for the Second Screen with Table Control
WA_TABCTRL2 TYPE TY_TBCTRL2,
ITST_CHECK TYPE TABLE OF TY_CHECK, " Internal table to check if record already exists
WA_CHECK TYPE TY_CHECK.
Constants
CONSTANTS: C_QP01 TYPE CHAR4 VALUE 'QP01', " Transaction Name
C_A TYPE CHAR1 VALUE 'E', " Mode
C_S TYPE CHAR1 VALUE 'S'. " Status
Global data Declaration
DATA: GV_YEAR(4) TYPE C, " Year part for Date
GV_MNTH(2) TYPE C, " Month part for Date
GV_DATE(2) TYPE C, " Day part for Date
GV_DATUM(10) TYPE C, " Concatenated Date in dd.mm.yyyy Format
GV_ANS TYPE C, " Answer to Continue
GV_FLAG_NEW(1) TYPE N VALUE 0. " Flag to set if Inspection Plan exists.
Declaration of the Internal Table with Header Line comprising of the uploaded data.
DATA: BEGIN OF IT_FILE_UPLOAD OCCURS 0.
INCLUDE STRUCTURE ALSMEX_TABLINE. " Rows for Table with Excel Data
DATA: END OF IT_FILE_UPLOAD.
Batch Input Data for a single Transaction.
Message of Call Transaction.
DATA: ITST_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE, " BDC Table
ITST_MSGTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE. " BDC Messages
S E L E C T I O N - S C R E E N *
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001,
BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK B2,
END OF BLOCK B1.
E V E N T : AT S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
STATIC = 'X'
CHANGING
FILE_NAME = P_FNAME.
E V E N T : S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Upload Excel file into Internal Table.
PERFORM UPLOAD_EXCEL_FILE. " To Upload the Excel File
IF NOT IT_FILE_UPLOAD IS INITIAL.
Confirm whether you want to proceed with the Upload.
PERFORM CONFIRM_UPLOAD.
IF GV_ANS EQ '1'.
Organize the uploaded data into another Internal Table.
PERFORM ORGANIZE_UPLOADED_DATA.
Validate if already some Inspection Plan exists for that Material Plant
IF ITST_TABDATA[] IS NOT INITIAL.
SELECT MATNR
WERKS
PLNNR
FROM MAPL
INTO TABLE ITST_CHECK
FOR ALL ENTRIES IN ITST_TABDATA
WHERE MATNR = ITST_TABDATA-MATNR AND WERKS = ITST_TABDATA-WERKS AND
PLNNR = ITST_TABDATA-PLNNR AND PLNTY = 'Q' AND LOEKZ 'X'.
ENDIF.
LOOP AT ITST_CHECK INTO WA_CHECK .
LOOP AT ITST_TABDATA INTO WA_TABDATA WHERE MATNR = WA_CHECK-MATNR
AND WERKS = WA_CHECK-WERKS AND PLNNR = WA_CHECK-PLNNR.
IF SY-SUBRC = 0. " If exists SET FLAG = 1.
GV_FLAG_NEW = 1.
DELETE ITST_TABDATA WHERE MATNR = WA_CHECK-MATNR AND WERKS = WA_CHECK-WERKS
AND PLNNR = WA_CHECK-PLNNR.
DELETE ITST_TABCTRL1 WHERE MATNR = WA_CHECK-MATNR AND WERKS = WA_CHECK-WERKS
AND PLNNR = WA_CHECK-PLNNR.
DELETE ITST_TABCTRL2 WHERE MATNR = WA_CHECK-MATNR AND WERKS = WA_CHECK-WERKS
AND PLNNR = WA_CHECK-PLNNR.
ENDIF.
ENDLOOP.
ENDLOOP.
Kick-start BDC Operation
PERFORM F_START_BDC. " If answer is YES, then start BDC Operations
ENDIF.
ELSE.
LEAVE PROGRAM. " If answer is NO or CANCEL then leave program
ENDIF.
*& Form F_START_BDC
text
--> p1 text
<-- p2 text
FORM F_START_BDC .
DATA : LV_FNAM(20) TYPE C, " Concatenated field name
LV_IDX1(3) TYPE N VALUE 1, " Index For Table Control 1
LV_IDX2(3) TYPE N VALUE 1, " Index For Table Control 2
LV_GOTO(4) TYPE N , " Index for GoTo Line No incase of Page Down
LV_PG(3) TYPE N VALUE 1. " Index for Page No
IF ITST_TABDATA[] IS INITIAL.
MESSAGE E000. " If Inspection Plan exists for all items in file, show error message
ENDIF.
LOOP AT ITST_TABDATA INTO WA_TABDATA.
LV_IDX2 = '1'.
CLEAR ITST_BDCDATA.
REFRESH ITST_BDCDATA.
GV_YEAR = SY-DATUM+0(4).
GV_MNTH = SY-DATUM+4(2).
GV_DATE = SY-DATUM+6(2).
CONCATENATE GV_DATE '.' GV_MNTH '.' GV_YEAR INTO GV_DATUM.
PERFORM BDC_DYNPRO USING 'SAPLCPDI' '8010'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RC27M-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RC27M-MATNR'
WA_TABDATA-MATNR. " 'kiz0006c'
PERFORM BDC_FIELD USING 'RC27M-WERKS'
WA_TABDATA-WERKS. " 'B001'
PERFORM BDC_FIELD USING 'RC271-PLNNR'
WA_TABDATA-PLNNR. " 60000000-99999999
PERFORM BDC_FIELD USING 'RC271-STTAG'
GV_DATUM. " '16.01.2008'
IF GV_FLAG_NEW = 1. " If Exists then diff screen for clicking NEW ENTRIES tab
PERFORM BDC_DYNPRO USING 'SAPLCPDI' '1200'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RC27X-ENTRY_ACT'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ANLG'.
PERFORM BDC_FIELD USING 'RC27X-ENTRY_ACT'
'1'.
PERFORM BDC_DYNPRO USING 'SAPLCPDA' '1200'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
ELSE.
PERFORM BDC_DYNPRO USING 'SAPLCPDA' '1200'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
ENDIF.
IF WA_TABDATA-KTEXT SPACE.
PERFORM BDC_FIELD USING 'PLKOD-KTEXT'
WA_TABDATA-KTEXT. " 'ZOLMITRIPTAN STAGE C1111'
ENDIF.
PERFORM BDC_FIELD USING 'PLKOD-VERWE'
WA_TABDATA-VERWE. " '5'
PERFORM BDC_FIELD USING 'PLKOD-STATU'
WA_TABDATA-STATU. " '4'
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLKOD-QPRZIEHVER'.
PERFORM BDC_FIELD USING 'PLKOD-SLWBEZ'
WA_TABDATA-SLWBEZ. " '200'
PERFORM BDC_FIELD USING 'PLKOD-QPRZIEHVER'
WA_TABDATA-QPRZIEHVER. " 'ACTIVE'
PERFORM BDC_DYNPRO USING 'SAPLCPDA' '1200'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=VOUE'.
LOOP AT ITST_TABCTRL1 INTO WA_TABCTRL1 WHERE MATNR = WA_TABDATA-MATNR
AND WERKS = WA_TABDATA-WERKS
AND PLNNR = WA_TABDATA-PLNNR.
ON CHANGE OF WA_TABCTRL1-MATNR OR WA_TABCTRL1-WERKS OR WA_TABCTRL1-PLNNR.
PERFORM BDC_DYNPRO USING 'SAPLCPDI' '1400'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLPOD-LTXA1(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
CONCATENATE 'PLPOD-ARBPL(' LV_IDX1 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL1-ARBPL. " 'qc01'
CONCATENATE 'PLPOD-STEUS(' LV_IDX1 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL1-STEUS. " 'qm01'
CONCATENATE 'PLPOD-LTXA1(' LV_IDX1 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL1-LTXA1. " 'opearation1'
PERFORM BDC_DYNPRO USING 'SAPLCPDI' '1400'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLPOD-VORNR(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=QMUE'.
PERFORM BDC_FIELD USING 'RC27X-ENTRY_ACT'
'1'.
PERFORM BDC_FIELD USING 'RC27X-FLG_SEL(01)'
'X'.
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '0150'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLMKB-STELLEN(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
LOOP AT ITST_TABCTRL2 INTO WA_TABCTRL2 WHERE MATNR = WA_TABCTRL1-MATNR AND
WERKS = WA_TABCTRL1-WERKS AND
PLNNR = WA_TABCTRL1-PLNNR.
AND ARBPL = WA_TABCTRL1-ARBPL AND
STEUS = WA_TABCTRL1-STEUS.
LV_GOTO = LV_PG * 140. " For Page Down on Second Table Control
IF LV_IDX2 >= 14.
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '0150'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RQPAS-AB_MKNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RQPAS-AB_MKNR'
LV_GOTO .
LV_IDX2 = 2.
LV_PG = LV_PG + 1.
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '0150'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
ELSE.
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '0150'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLMKB-STELLEN(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
ENDIF.
CONCATENATE 'PLMKB-VERWMERKM(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-VERWMERKM. " 'MIC00001'/ ' MIC00050'
IF WA_TABCTRL2-PMETHODE SPACE.
CONCATENATE 'PLMKB-PMETHODE(' LV_IDX2')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-PMETHODE. " 'met00001'
CONCATENATE 'PLMKB-PMTVERSION(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-PMTVERSION. " '1'
CONCATENATE 'PLMKB-STICHPRVER(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-STICHPRVER. " 'APIFX1'
CONCATENATE 'PLMKB-PRUEFEINH(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-PRUEFEINH. " '20'
CONCATENATE 'PLMKB-PROBEMGEH(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-PROBEMGEH. " 'G'
CONCATENATE 'PLMKB-STELLEN(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-STELLEN. " '2'
CONCATENATE 'RQPAS-MASSEINHSW(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-MASSEINHSW. " '%'
CONCATENATE 'QFLTP-SOLLWERT(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-SOLLWERT. " '10'
CONCATENATE 'QFLTP-TOLERANZUN(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-TOLERANZUN. " '5'
CONCATENATE 'QFLTP-TOLERANZOB(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-TOLERANZOB. " '15'
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '1501'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENT1'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLMKB-VERWMERKM'.
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '1502'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENT1'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLMKB-PMETHODE'.
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '1502'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENT1'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLMKB-PMETHODE'.
ELSE.
CONCATENATE 'PLMKB-PMTVERSION(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-PMTVERSION. " '1'
CONCATENATE 'PLMKB-STICHPRVER(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-STICHPRVER. " 'APIFX1'
CONCATENATE 'PLMKB-PRUEFEINH(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-PRUEFEINH. " '20'
CONCATENATE 'PLMKB-PROBEMGEH(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-PROBEMGEH. " 'G'
CONCATENATE 'PLMKB-STELLEN(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-STELLEN. " '2'
CONCATENATE 'RQPAS-MASSEINHSW(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-MASSEINHSW. " '%'
CONCATENATE 'QFLTP-SOLLWERT(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-SOLLWERT. " '10'
CONCATENATE 'QFLTP-TOLERANZUN(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-TOLERANZUN. " '5'
CONCATENATE 'QFLTP-TOLERANZOB(' LV_IDX2 ')' INTO LV_FNAM.
PERFORM BDC_FIELD USING LV_FNAM
WA_TABCTRL2-TOLERANZOB. " '15'
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '1501'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENT1'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'PLMKB-QMTB_WERKS'.
PERFORM BDC_FIELD USING 'PLMKB-VERWMERKM'
WA_TABCTRL2-VERWMERKM.
PERFORM BDC_FIELD USING 'PLMKB-QPMK_WERKS'
WA_TABCTRL2-WERKS.
PERFORM BDC_FIELD USING 'PLMKB-QMTB_WERKS'
ENDIF.
LV_IDX2 = LV_IDX2 + 1.
ENDLOOP.
ENDON.
ENDLOOP.
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '0150'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RQPAS-ENTRY_ACT'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=QMBU'.
PERFORM BDC_FIELD USING 'RQPAS-ENTRY_ACT'
'1'.
CALL TRANSACTION C_QP01 USING ITST_BDCDATA
MODE C_A UPDATE C_S
MESSAGES INTO ITST_MSGTAB. "#EC CI_CALLTA
ENDLOOP.
ENDFORM. " F_START_BDC
*& Form UPLOAD_EXCEL_FILE
text
--> p1 text
<-- p2 text
FORM UPLOAD_EXCEL_FILE .
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FNAME
I_BEGIN_COL = 1
I_BEGIN_ROW = 2
I_END_COL = 19
I_END_ROW = 9999
TABLES
INTERN = IT_FILE_UPLOAD.
ENDFORM. " UPLOAD_EXCEL_FILE
*& Form CONFIRM_UPLOAD
text
--> p1 text
<-- p2 text
FORM CONFIRM_UPLOAD .
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = TEXT-002
TEXT_QUESTION = TEXT-003
IMPORTING
ANSWER = GV_ANS
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2.
ENDFORM. " CONFIRM_UPLOAD
*& Form BDC_DYNPRO
text
-->P_0589 text
-->P_0590 text
FORM BDC_DYNPRO USING PROGRAM
DYNPRO.
CLEAR: ITST_BDCDATA.
ITST_BDCDATA-PROGRAM = PROGRAM.
ITST_BDCDATA-DYNPRO = DYNPRO.
ITST_BDCDATA-DYNBEGIN = 'X'.
APPEND ITST_BDCDATA.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
text
-->P_0729 text
-->P_0730 text
FORM BDC_FIELD USING FNAM
FVAL.
CLEAR: ITST_BDCDATA.
ITST_BDCDATA-FNAM = FNAM.
ITST_BDCDATA-FVAL = FVAL.
APPEND ITST_BDCDATA.
ENDFORM. " BDC_FIELD
*& Form ORGANIZE_UPLOADED_DATA
text
--> p1 text
<-- p2 text
FORM ORGANIZE_UPLOADED_DATA .
DATA : LV_TOTROW TYPE I, " Total Records
LV_ROW TYPE I. " Row No
LV_TOTROW = 1.
SORT IT_FILE_UPLOAD BY ROW
COL.
LOOP AT IT_FILE_UPLOAD.
LV_TOTROW = IT_FILE_UPLOAD-ROW. " To find total rows
ENDLOOP.
LV_ROW = 1.
WHILE LV_ROW <= LV_TOTROW.
LOOP AT IT_FILE_UPLOAD WHERE ROW = LV_ROW.
CASE IT_FILE_UPLOAD-COL.
WHEN '0001'. " Material
TRANSLATE IT_FILE_UPLOAD-VALUE TO UPPER CASE.
WA_TABDATA-MATNR = IT_FILE_UPLOAD-VALUE.
WA_TABCTRL1-MATNR = IT_FILE_UPLOAD-VALUE.
WA_TABCTRL2-MATNR = IT_FILE_UPLOAD-VALUE.
WHEN '0002'. " Plant
TRANSLATE IT_FILE_UPLOAD-VALUE TO UPPER CASE.
WA_TABDATA-WERKS = IT_FILE_UPLOAD-VALUE.
WA_TABCTRL1-WERKS = IT_FILE_UPLOAD-VALUE.
WA_TABCTRL2-WERKS = IT_FILE_UPLOAD-VALUE.
WHEN '0003'. " Group Key
WA_TABDATA-PLNNR = IT_FILE_UPLOAD-VALUE.
WA_TABCTRL1-PLNNR = IT_FILE_UPLOAD-VALUE.
WA_TABCTRL2-PLNNR = IT_FILE_UPLOAD-VALUE.
WHEN '0004'. " Group Counter Desc
WA_TABDATA-KTEXT = IT_FILE_UPLOAD-VALUE.
WHEN '0005'. " Usage
WA_TABDATA-VERWE = IT_FILE_UPLOAD-VALUE.
WHEN '0006'. " Status
WA_TABDATA-STATU = IT_FILE_UPLOAD-VALUE.
WHEN '0007'. " Inspection Point
WA_TABDATA-SLWBEZ = IT_FILE_UPLOAD-VALUE.
WHEN '0008'. " Sample Drawing Procedure
WA_TABDATA-QPRZIEHVER = IT_FILE_UPLOAD-VALUE.
WHEN '0009'. " Work Centre
WA_TABCTRL1-ARBPL = IT_FILE_UPLOAD-VALUE.
WA_TABCTRL2-ARBPL = IT_FILE_UPLOAD-VALUE.
WHEN '0010'. " Control Key
WA_TABCTRL1-STEUS = IT_FILE_UPLOAD-VALUE.
WA_TABCTRL2-STEUS = IT_FILE_UPLOAD-VALUE.
WHEN '0011'. " Desc
WA_TABCTRL1-LTXA1 = IT_FILE_UPLOAD-VALUE.
WHEN '0012'. " MIC
WA_TABCTRL2-VERWMERKM = IT_FILE_UPLOAD-VALUE.
WHEN '0013'. " Method
WA_TABCTRL2-PMETHODE = IT_FILE_UPLOAD-VALUE.
WHEN '0014'.
WA_TABCTRL2-PMTVERSION = IT_FILE_UPLOAD-VALUE.
WHEN '0014'. " Sampling
WA_TABCTRL2-STICHPRVER = IT_FILE_UPLOAD-VALUE.
WHEN '0016'.
WA_TABCTRL2-PRUEFEINH = IT_FILE_UPLOAD-VALUE.
WHEN '0017'.
WA_TABCTRL2-PROBEMGEH = IT_FILE_UPLOAD-VALUE.
WHEN '0015'. " Accuracy
WA_TABCTRL2-STELLEN = IT_FILE_UPLOAD-VALUE.
WHEN '0016'. " Unit
WA_TABCTRL2-MASSEINHSW = IT_FILE_UPLOAD-VALUE.
WHEN '0017'. " Target Value
WA_TABCTRL2-SOLLWERT = IT_FILE_UPLOAD-VALUE.
WHEN '0018'. " Lower Limit
WA_TABCTRL2-TOLERANZUN = IT_FILE_UPLOAD-VALUE.
WHEN '0019'. " Upper Limit
WA_TABCTRL2-TOLERANZOB = IT_FILE_UPLOAD-VALUE.
ENDCASE.
ENDLOOP.
LV_ROW = LV_ROW + 1.
INSERT WA_TABDATA INTO TABLE ITST_TABDATA .
APPEND WA_TABCTRL1 TO ITST_TABCTRL1.
APPEND WA_TABCTRL2 TO ITST_TABCTRL2.
CLEAR :WA_TABDATA,WA_TABCTRL1,WA_TABCTRL2.
ENDWHILE.
ENDFORM. " ORGANIZE_UPLOADED_DATA
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
Free all internal tables
FREE: ITST_TABDATA,
ITST_TABCTRL1,
ITST_TABCTRL2.
Regards,
Raj. -
Screen - exits - step by step simple examples
hi ,
i am new to user exits.
pls help me by giving step by step example for creating a subscreen with 2 fields , and incorporate with some standard sap transactions.
there are many who discussed the same topic in the forum ,but i find confusing.
*so please don't give me the links, take standard transaction and provide me step by step .
Thank you.
regards
Sreehi,
SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
To pave way for this, SAP has provided the option for screen exits. Usually, SAP provides the following:
An append structure in the database table with the new fields.
A subscreen area into the standard screen u2013 where the programmer can attach his subscreen of his own program with the new fields.
A function group under which the new subscreen has to be created with the new fields.
Function exits to synchronize the PBO and PAI of the standard SAP program with the PBO and PAI of the subscreen u2013 so that data can flow back and forth between the standard SAP program and the program written by the developer for the subscreen. These function modules also exist in the same function group under which the subscreen will have to be developed.
Finally, a linkage has to be done between the subscreen area of standard SAP screen with the custom subscreen constructed by the developer.
Typically, SAP provides an enhancement in which the developer can create an append structure, use the function exits to synchronize the PBO and PAI of the standard SAP program and the custom subscreen program, and make the necessary linking( as mentioned above in step 4. But, again, this is not a hard and fast rule. Linking in some case, is also done by configurations.) SAP also usually provides the name of the function group under which the subscreen has to be developed.
Necessary guidance about implementing a screen exit development is usually available in the Documentation section of the enhancement ( can be availed by transaction SMOD).
Pre-Requisites
The developer to work on screen exit should have essential knowledge on the following:
DDIC concepts, including the knowledge of append structure.
Concept of SAP Enhancements and implementing them using Projects.
Concept of function exits.
Knowledge on Module Pool u2013 including subscreens, Tabstrip controls etc.
Steps
Guidelines
So, a developer can follow the guidelines mentioned below to implement a screen exit to a standard SAP transaction, as and when required:
Find out the Required Enhancements
Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton u2018SAP Applicationsu2019. A list will appear that contains information on all the enhancements, categorized under functional areas. Developer must search for the enhancements relevant to his functional area of interest u2013 for e.g., Purchasing, Asset Accounting, etc.
Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
Utilize the Enhancement in a Project
After you have found one, do as directed in the documentation. Generally, the steps are as follows:
Create a project using CMOD including your enhancement.
Create the append structure with new fields.
Go to the desired function group and create a subscreen with the new fields. Write PBO and PAI for the subscreen, if required.
Use the function exits in the enhancement to link the PBO and PAI of the subscreen with that of the main SAP program supporting the SAP transaction.
Maintain necessary linkage between the subscreen area of standard SAP program with the custom subscreen developed along with the custom program name. This can be done in the project (developed by CMOD including the enhancement) or outside as a part of configuration.
Activate the project.
Test to ensure that required functionality are met.
Case Study 1
Add three new custom fields for Asset master and maintain information for them
Requirement
Three fields in the legacy system have to be maintained in Asset master. These fields are:
Original Asset number u2013 20 characters
Location 2 u2013 15 Characters.
Model no u2013 20 characters
Location 2 should start with u2018Lu2019.
Pre-Analysis
Finding out the Enhancement
As described above, the enhancement is determined. It was found, that enhancement AIST0002 will serve the purpose. It contains the following components (can be viewed by transaction SMOD):
Exit Type Description EXIT_SAPL1022_001 Function Exit Check of User-Defined Fields when Using Create and Change BAPI EXIT_SAPLAIST_002 Function Exit Transfer Data for User Subscreens in PBO. EXIT_SAPLAIST_003 Function Exit Transfer of User-Defined Fields to SAP Master Data Transactions CI_ANLU Customizing Include Include structure to add new fields
Studying the Function Exits
The function module level documentation for the function exits are then viewed from transaction SE37. The documentation clearly laid out for the purpose for their use:
EXIT_SAPLAIST_002
Function module Level Documentation
This function module is called by asset master data maintenance at the start of the dialog. (When changing, it is called after reading of the data from the database; when creating it is called after the transfer of the default values from the asset class and reference asset.) The purpose of the function module is to enable this function group to recognize the master data. For interpreting or controlling master data fields that are important for user fields, it is possible to transfer to global variables at this point, so that they can be recognized when the user subscreens are processed.
Import Parameters
Understanding
This function module is called at the PBO to pass the information retrieved from the database to pass them to the custom subscreen and its underlying program. Import parameter : I_ANLU will be populated with the values for user-defined fields which will be passed to the subscreen program. So, there must be some sort of variable assignment from I_ANLU.
EXIT_SAPLAIST_003
Function module Documentation: This function module is called by SAP asset master data maintenance after the screens are processed, but before saving. The purpose of the function module is to transfer fields entered on user sub-screens of SAP asset data maintenance to the database for updating. The export parameter for this function module is:
Understanding
This function module will be used to transfer the user entered data in the subscreen fields to the main SAP program, which will then be saved into the database.
Studying the Documentation of the Enhancement
The enhancement documentation (as is viewed from the initial screen of SMOD] also supports the idea. Moreover, it informs that we need to develop a subscreen under function group XAIS. This is the function group under which the two function exit modules also exist. So, if the custom subscreen refers to the global data of the function group XAIS, then those values will also be available to these function exits as well.
Going to SE80 and viewing the function group XAIS helps us to inform that there are three DDIC tables declared for it:
Deciding the Final course of Action
After making all the investigations, the final course of action was determined.
SrlNo Step Justification
A project has to be created using transaction CMOD where the enhancement AIST0002 will be included.
Customizing include CI_ANLU has to be created with the custom fields demanded When CI_ANLU will be developed, the custom fields will get appended to the database table ANLU. Also, these fields will be used to create screen fields in the new subscreen.
A custom subscreen, say, 9000 will be developed under function group XAIS. The screen group for the screen will be u2018CUSTu2019 (or any name). The three custom fields added to table ANLU (by creating CI_ANLU) will be used to create new fields in the screen.
In the PAI of the subscreen, validation for Location to start with u2018Lu2019 will be added. The subscreen with three new fields has to be developed so that it can be attached to a subscreen area of the asset master screens.
In the custom include of the function exit module u2018EXIT_SAPLAIST_002u2019, the following code will be written:-
ANLU = I_ANLU. I_ANLU is the import parameter of this FM. The value is assigned to the global variable ANLU, referring which the three new subscreen fields are developed. So, data retrieved from database table ANLU will be passed to this FM as I_ANLU by the standard SAP main program. The value will be taken and passed to the global variable of the function group XAIS, so that the three custom fields (referring to ANLU of XAIS) get populated.
In the custom include of the function exit module u2018EXIT_SAPLAIST_003u2019, the following code will be written:-
E_ANLU = ANLU. The changed values in the subscreen fields exist in global variable ANLU for the function group XAIS. This function exit module will pass the data back to the SAP main program as E_ANLU.
Proper linkage/configuration has to be done so that the new subscreens get linked to the appropriate subscreen area of the Asset master screen. This has to be done u2013 otherwise, the new custom subscreen will not be displayed in the Asset master screens.
Development
Creating a Project to include the enhancement
Go to transaction CMOD and create a project.
Enter a description for the project. Then, click on the pushbutton u2018Enhancement Assignmentsu2019 in the Application Toolbar.
Enter the name of the enhancement and Save.
Go to u2018Componentsu2019.
Creating Custom Include for ANLU
The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.
Create the include structure with three new fields, as required. Then, save and activate it.
Develop the subscreen and the program
Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.
Create it as subscreen.
Then, go to the Layout of the screen and create three new fields from Database table ANLU.
Drag the fields in the screen body and place them.
Then, save and activate the screen and come back to screen flow editor.
Create the PAI module to add validation for field u201CLocation 2u201D, as required .
Activate the whole function group and come out.
Write code in the Function Exits to synchronize the programs
Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.
Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:
Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.
Then, activate everything u2013 the whole project and come out.
Complete the configuration to link the subscreen
The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.
Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.
Here, the requirement is to create these three custom fields in the tab page u2018Generalu2019 of asset master screen ( AS01/AS02/AS03/AS91).
Determine the Layout
To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class u20181000u2019 and click on folder u2018General Assignment of Layoutu2019.
Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout u2018SAPu2019 cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.
Create new tab layout
Go to transaction AOLA. Copy the tab layout u2018SAPu2019 to create another layout, say, YSUB.
System will copy all the settings and will inform you about that.
Select your newly created layout and double-click on the folder u2018Tab page titlesu2019.
You want to put your custom fields in the tab page u201CGeneralu201D. So, select this tab page entry and double-click on the folder "Position of Groups".
Here, all the field groups currently residing in the tab-page u201CGeneralu201D are shown. Add an entry for your newly created fields.
Select the group box from the list. An entry will come with u201CUu201D padded with the custom subscreen prepared by you.
Then, save and come out.
Assign the new Layout to Asset Class
Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.
Save and come out.
Test the Exit
Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to themu2026save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not. -
Hi,
I am working on screen exits for VA01.
Can someone tell me how to add table control in a sub screeen at item level in additional data B ?Hi
How to implement screen exit for a SAP standard transaction HOT
Introduction
SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
To pave way for this, SAP has provided the option for screen exits. Usually, SAP provides the following:
An append structure in the database table with the new fields.
A subscreen area into the standard screen where the programmer can attach his subscreen of his own program with the new fields.
A function group under which the new subscreen has to be created with the new fields.
Function exits to synchronize the PBO and PAI of the standard SAP program with the PBO and PAI of the subscreen so that data can flow back and forth between the standard SAP program and the program written by the developer for the subscreen. These function modules also exist in the same function group under which the subscreen will have to be developed.
Finally, a linkage has to be done between the subscreen area of standard SAP screen with the custom subscreen constructed by the developer.
Typically, SAP provides an enhancement in which the developer can create an append structure, use the function exits to synchronize the PBO and PAI of the standard SAP program and the custom subscreen program, and make the necessary linking( as mentioned above in step 4. But, again, this is not a hard and fast rule. Linking in some case, is also done by configurations.) SAP also usually provides the name of the function group under which the subscreen has to be developed.
Necessary guidance about implementing a screen exit development is usually available in the Documentation section of the enhancement ( can be availed by transaction SMOD).
Pre-Requisites
The developer to work on screen exit should have essential knowledge on the following:
DDIC concepts, including the knowledge of append structure.
Concept of SAP Enhancements and implementing them using Projects.
Concept of function exits.
Knowledge on Module Pool including subscreens, Tabstrip controls etc.
Steps
Guidelines
So, a developer can follow the guidelines mentioned below to implement a screen exit to a standard SAP transaction, as and when required:
Find out the Required Enhancements
Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton SAP Applications. A list will appear that contains information on all the enhancements, categorized under functional areas. Developer must search for the enhancements relevant to his functional area of interest for e.g., Purchasing, Asset Accounting, etc.
Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
Utilize the Enhancement in a Project
After you have found one, do as directed in the documentation. Generally, the steps are as follows:
Create a project using CMOD including your enhancement.
Create the append structure with new fields.
Go to the desired function group and create a subscreen with the new fields. Write PBO and PAI for the subscreen, if required.
Use the function exits in the enhancement to link the PBO and PAI of the subscreen with that of the main SAP program supporting the SAP transaction.
Maintain necessary linkage between the subscreen area of standard SAP program with the custom subscreen developed along with the custom program name. This can be done in the project (developed by CMOD including the enhancement) or outside as a part of configuration.
Activate the project.
Test to ensure that required functionality are met.
Case Study 1
Add three new custom fields for Asset master and maintain information for them
Requirement
Three fields in the legacy system have to be maintained in Asset master. These fields are:
Original Asset number 20 characters
Location 2 15 Characters.
Model no 20 characters
Location 2 should start with L.
Pre-Analysis
Finding out the Enhancement
As described above, the enhancement is determined. It was found, that enhancement AIST0002 will serve the purpose. It contains the following components (can be viewed by transaction SMOD):
Exit Type Description EXIT_SAPL1022_001 Function Exit Check of User-Defined Fields when Using Create and Change BAPI EXIT_SAPLAIST_002 Function Exit Transfer Data for User Subscreens in PBO. EXIT_SAPLAIST_003 Function Exit Transfer of User-Defined Fields to SAP Master Data Transactions CI_ANLU Customizing Include Include structure to add new fields
Studying the Function Exits
The function module level documentation for the function exits are then viewed from transaction SE37. The documentation clearly laid out for the purpose for their use:
EXIT_SAPLAIST_002
Function module Level Documentation
This function module is called by asset master data maintenance at the start of the dialog. (When changing, it is called after reading of the data from the database; when creating it is called after the transfer of the default values from the asset class and reference asset.) The purpose of the function module is to enable this function group to recognize the master data. For interpreting or controlling master data fields that are important for user fields, it is possible to transfer to global variables at this point, so that they can be recognized when the user subscreens are processed.
Import Parameters
Understanding
This function module is called at the PBO to pass the information retrieved from the database to pass them to the custom subscreen and its underlying program. Import parameter : I_ANLU will be populated with the values for user-defined fields which will be passed to the subscreen program. So, there must be some sort of variable assignment from I_ANLU.
EXIT_SAPLAIST_003
Function module Documentation: This function module is called by SAP asset master data maintenance after the screens are processed, but before saving. The purpose of the function module is to transfer fields entered on user sub-screens of SAP asset data maintenance to the database for updating. The export parameter for this function module is:
Understanding
This function module will be used to transfer the user entered data in the subscreen fields to the main SAP program, which will then be saved into the database.
Studying the Documentation of the Enhancement
The enhancement documentation (as is viewed from the initial screen of SMOD] also supports the idea. Moreover, it informs that we need to develop a subscreen under function group XAIS. This is the function group under which the two function exit modules also exist. So, if the custom subscreen refers to the global data of the function group XAIS, then those values will also be available to these function exits as well.
Going to SE80 and viewing the function group XAIS helps us to inform that there are three DDIC tables declared for it:
Deciding the Final course of Action
After making all the investigations, the final course of action was determined.
SrlNo Step Justification
A project has to be created using transaction CMOD where the enhancement AIST0002 will be included.
Customizing include CI_ANLU has to be created with the custom fields demanded When CI_ANLU will be developed, the custom fields will get appended to the database table ANLU. Also, these fields will be used to create screen fields in the new subscreen.
A custom subscreen, say, 9000 will be developed under function group XAIS. The screen group for the screen will be CUST (or any name). The three custom fields added to table ANLU (by creating CI_ANLU) will be used to create new fields in the screen.
In the PAI of the subscreen, validation for Location to start with L will be added. The subscreen with three new fields has to be developed so that it can be attached to a subscreen area of the asset master screens.
In the custom include of the function exit module EXIT_SAPLAIST_002, the following code will be written:-
ANLU = I_ANLU. I_ANLU is the import parameter of this FM. The value is assigned to the global variable ANLU, referring which the three new subscreen fields are developed. So, data retrieved from database table ANLU will be passed to this FM as I_ANLU by the standard SAP main program. The value will be taken and passed to the global variable of the function group XAIS, so that the three custom fields (referring to ANLU of XAIS) get populated.
In the custom include of the function exit module EXIT_SAPLAIST_003, the following code will be written:-
E_ANLU = ANLU. The changed values in the subscreen fields exist in global variable ANLU for the function group XAIS. This function exit module will pass the data back to the SAP main program as E_ANLU.
Proper linkage/configuration has to be done so that the new subscreens get linked to the appropriate subscreen area of the Asset master screen. This has to be done otherwise, the new custom subscreen will not be displayed in the Asset master screens.
Development
Creating a Project to include the enhancement
Go to transaction CMOD and create a project.
Enter a description for the project. Then, click on the pushbutton Enhancement Assignments in the Application Toolbar.
Enter the name of the enhancement and Save.
Go to Components.
Creating Custom Include for ANLU
The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.
Create the include structure with three new fields, as required. Then, save and activate it.
Develop the subscreen and the program
Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.
Create it as subscreen.
Then, go to the Layout of the screen and create three new fields from Database table ANLU.
Drag the fields in the screen body and place them.
Then, save and activate the screen and come back to screen flow editor.
Create the PAI module to add validation for field Location 2, as required .
Activate the whole function group and come out.
Write code in the Function Exits to synchronize the programs
Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.
Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:
Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.
Then, activate everything the whole project and come out.
Complete the configuration to link the subscreen
The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.
Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.
Here, the requirement is to create these three custom fields in the tab page General of asset master screen ( AS01/AS02/AS03/AS91).
Determine the Layout
To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class 1000 and click on folder General Assignment of Layout.
Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout SAP cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.
Create new tab layout
Go to transaction AOLA. Copy the tab layout SAP to create another layout, say, YSUB.
System will copy all the settings and will inform you about that.
Select your newly created layout and double-click on the folder Tab page titles.
You want to put your custom fields in the tab page General. So, select this tab page entry and double-click on the folder "Position of Groups".
Here, all the field groups currently residing in the tab-page General are shown. Add an entry for your newly created fields.
Select the group box from the list. An entry will come with U padded with the custom subscreen prepared by you.
Then, save and come out.
Assign the new Layout to Asset Class
Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.
Save and come out.
Test the Exit
Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to them save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not.
Original Source: ittoolbox.com
Screen Exit is nothing but enhancing the screen like creating some more fields, subscreen and so on.
1. Go to the screen>System>Status-->Program (Double
click this program. It will take you to the program.
2. Now, Goto-->Object Directory Entry.
3. Make a note the package name.
4. Now run the transactions SMOD, press F4 and enter the
above noted package, press enter.
5. It will display list of Exits.
6. Now go back to the initial screen SMOD.
7. Specify the exit name here and select the radio button
Components.
8. It will display four group boxes one for FM, second
for Fcodes, thrid for Screen areas and last for
includes.
9. Goto transaction CMOD, create a new project, and
click the button "Enhancement assignments" and
specify your enhancements that you got in SMOD.
10. Now bouble clikc the enhancement, it will take you to editor with some includes starting with Z, double clikc the include you want to edit and proceed.
and you just go through these links also
Screen exit
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
screen-exits
Check the following link.
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=how%20to%20find%20screen%20exits&cat=sdn_all
Reward points if useful
Regards
Anji
Maybe you are looking for
-
BIREQU_* job consuming more time in R/3 Source system
Hi Experts, I am performance issues while extracting data from SAP R/3, after upgrade to oracle. R/3 job BIREQU_* takes more time in selection of data. Particularly in step **02.08.2008 15:32:38 *******************************************************
-
Resetting my iPad 2 to factory specs
My iPad yesterday asked me to set a password out of the blue and wouldn't let me do anything until I did. I went to settings and tried to turn the password off. The turn off feature was grayed out. I rebooted the iPad and synced it with iTunes but
-
Sync iphone with ical, sync iphone with ical
How do i sync my iPhone with iCal on my Mac? FYI I DO NOT want to use iCloud because MobileMe NEVER worked right for me.
-
I bought a second-hand Blackberry Curve 8520 today, and called my provider, Virgin asking them if they could help with App-World, they left me on hold for nearly 30 minutes so I hung up. I have got my BBM sorted, but when I try to use the App World i
-
Load messges in bulk from SE91
I have requirement where in i have to upload meassages in bulk from a excel, is there a standard program or a function module where i can do this?