Deletion Flag to Equipment
Hi Experts,
I have replaced an equipment with new one and scrapped the old one.Can you tell me what system status i maintain
should i put in available status with user status scrapped or put the deletion flag and user status scrapped.
Also if i put deletion flag to equipment is the same will affect somewhere like settlement of order etc.
AR
Edited by: Amit Rana on Feb 22, 2010 5:05 PM
AR,
You may want to do both. Set the User status to "SCRAP" and also set the "Deletion flag" On the equipment master for information / historical purpose. There shouldn't be any effect on the settlement process of the order as such.
Whenever you use the same piece of equipment again on the order a warning/ error message may come up indicating to check the status of the the object.
Regards
Narasimhan
Similar Messages
-
Deletion flags for equipment BOM
Hi,
In equipment BOM header , there are 2 fields for deletion flag :
-one is set manually (the one on the right)
-the other set by the system (the one on the left).
Can someone explain to me how deletion flag indicator (on the left) work?
Thanks,
P.Hi,
To explain this i must say first there is a difference in the Deletion Flag (Right in Header) and Deletion Indicator(Left in Header).
In SAP term The deletion Indicator shows the item which has already been Deleted from the System and Deletion flag shows that the record has been flagged for deletion and will hence be Archieve (when, depends on the Archieving strategy followed in the company).
To explain the affect these will have is the Deletion Indicator will not allow you to use the and will show the error as the object has been deleted and is not in the system.
Deletion flag for BOMs
Indicator: this BOM will be archived during the next archiving run and, if necessary, deleted from the data base.
Where as the Deletion Flag will show that the object is ready to be archieved and is set to be deleted.
Deletion Indicator
Indicator showing that the BOM header or the BOM item has been deleted with reference to the change number.
Now there is another difference in the way we can amke the objects active from deletion flag anf the deletion indicator.
For Deletion flag you have to go to change mode and just remove or untick the deletion flag.
For Deletion indicator you have to go to Archieve table and pull the object back in to SAP system and it will then show only the deletion flag, which can be removed by the way explained above.
I hope this was helpful, if yes then please award points.
Regards
Anoop -
Deletion flag at functional location - equipment installation sallowed
Hi
Small question, when we set deletion flag at functional location we can still instal equipment in transaction IE02. Is it possible to configure LF in such way that after setting delation flag or inactivation FL equipment installation shouldn't be allowed??
We wanted to do it by user status but we can't.
Thanks for help. Regards. JoannaHi Joanna,
Try using user exit IEQM0001 and write a custom code, not to allow equipment being installed in deleted / inactive function location.
Regards,
Prabhu -
FM/Bapi to set the Equipment deletion flag
Hi guys!
Does someone know a FM or Bapi to set the deletion flag for an equipment.
So it's should be the same functionlity like in IE02 --> Equipment --> Functions --> Deletion Flag --> set
thanks!easiest way:
CLEAR: bdcdata, bdcdata[].
PERFORM bdc_dynpro USING 'SAPMIEQ0' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RM63E-EQUNR'
p_equip.
PERFORM bdc_dynpro USING 'SAPMIEQ0' '0101'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=LVSE'.
PERFORM bdc_dynpro USING 'SAPMIEQ0' '0101'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
* Call transaction for marking equipement as deleted
CALL TRANSACTION 'IE02' USING bdcdata
MODE tp_mode
UPDATE 'S'
MESSAGES INTO messtab.
CLEAR: bdcdata, bdcdata[]. -
Follow up action to set delete flag after UD (QS41, QS51)
Hi all,
If user give UD as 'not good' for Equipment (eg Vernier Caliper) then he has to set delete flag for maintenance plan no and Equipment no through IP02 and IE02 respectively
now he want that, above delete flag should set automatically after giving UD so particular maintenance plan or equipment should not release in future.
I got one follow up action 'QM_PM' in transaction QS51 due to this after giving UD for Inspection lot, plan get technically complete (TECHO)
so how to make changes so i'll achieve above functionality
plz tell me about catalog, follow up action, QS41
thanks....Hi all,
i got one solution on which i am working
Steps:
1.The solution is to use the User Exit namely QEVA0010 and use the logic as mentioned below.
2. Test and use the above mentioned user exit.
3. The first condition should be checked for Inspection Type - 14 and for UD code NG.
4.Logic to be used To set the deletion flag for the Equipment.
Go to Table QAPP - Pass inspection lot Number and get the Equipment no.
Go to Table EQUI - Pass Equipment no and get OBJNR
Go to Table JEST - Pass the Objnr - The value for deletion flag status is active is I0076 and the value for deletion flag inactive is I0320.
In order to set the deletion Flag,use help of FM - STATUS_CHANGE_INTERN to code.
5.Logic to be used To set the deletion flag for the Maintenance Plan.
Go to Table QALS - Pass inspection lot no and get the order no.
Go to Table AFIH - Pass order no - Get maintenance Plan.
Go to Table MPLA - Pass the maintenance plan and get the Objnr no.
JEST - Pass the Objnr - The value for deletion flag status is active is I0076 and the value for deletion flag inactive is I0320.
In order to set the deletion Flag,use help of FM - STATUS_CHANGE_INTERN to code. -
Dear PM Experts,
I want to Set the Deltion Flag for the Equipment, Notification and Mainteance Order. I know the way for Setting Deletion Flag.
I want to save the reason for setting 'Deletion Flag' where should i mention the reason. Is there any user exit for Checking the same.
Thanks in advance..
Regards,
Murugesh R
Duplicate of [thread|Reason for deletion Flag; in EAM forum, this one being locked.
Edited by: Paul Meehan on Feb 10, 2010 10:25 AMDear Murugesh,
I am not sure whether this can be done in standard SAP.But you can create new fields on notification and maintenance orders using user exits. i.e you can create a field reason for setting deletion flag.
Notifications -- QQMA0001
Maintenance Order -- IWO10018.
You can use these user exits. Hope this helps.
Warm Regards
Vivek -
Hi,
Even when we have set a Deletion flag for a Functional Location, it allows us to install Equipment in it. Our
requirement is that the System should disallow it. How can we restrict equipment installation?
Regards
AbhiHi PeteA,
I have already tried the first option.
Can you explain the procedure ,how to restrict equipment installation by using user status. I tried that but could not find any business transaction releated to equipment installation for Object--FL in Status Profile creation.
Abhi -
Hi;
I want ta change the status of the equipments with deletion flag.Is there any way to made that for more than one equipment.I meam i want add delete flag all equipments in one time.
Thanks.Hi ,
Thanks to everyone who has replied , but still the Problem persists
Its not generating Archive File after write operation
During Delete Operation in Tcode SARA during Archive Selection
It shows no data found .
Steps I have Done :
1) Define Logical File Mapping to Physical File (/tmp/<Filename>) in FILE Tcode as well as in SF01 Tcode
2) Then In SARA -> Customizing -> Technical Settings -> Variant SAP&TEST
and SAP&PRD
3) Then Executed Write Operation -> Define variant of Equipments marked as Deletion flag & executed Write operation . Job Finished Successfully .
4) when I execute Delete Operation : During Archive Selection It says no data found
Thanks in advance
Regards
Deepak -
Deactivation and Deletion Flag
Hi guys
what is the difference between deletion flag , deactivate and mark deletion and what is the impact of these status ?
regardsHello Jitendra,
Apart from it if we take the example of technical object then
If you inactive it then u will not be able to do the following function
Assignment to delivery
Assignment to inspection sto
Blocked condition
Copy partners - delivery
Copy partners - order
Create Equi under construc
Delete assign. to inspectn
Delete assignment (Bump/Ve
Delete assignment in quote
Delete assignment to deliv
Delete assignment to order
Deliv to custmr retn packa
Deliv. to customer consign
Delivery note assignment
Delivery to Customer: Canc
Delivery to customer
Dissolve equipment hierarc
Enter PM processing data
Goods issues
Goods receipts
Handling unit assignment
Inwd movemt to consgnmt cu
Inwd movemt to custr retn p
License split
License split (new license)
Lock PRT from use
Order assign. (version chg.
Order assignment
Order assignment (bump)
Outw movemt fm consigmt cus
Outw movemt fm retn pakg cu
PP order assignment
Quote assign. (version chan
Quote assignment
Quote assignment
Quote assignment (bump)
Release PRT for use
Release equipment for use
Return fm custr consignm
Return fm custr retn pac
Return to stock
Rush order (bump)
Rush order (version change)
Service contract assignment
Set object inactive
Stock transfer
Stock transfer (one-step)
Structure equipment hierarc
Use production resources/to
And after You put the deletion flag then at the time of archiving process this will be archived from the system.
Similarly for the order and notifications the last point applicable.
For maintenance plan it is already being explained.
Regards
Naveen -
Problem :ALV:Deletion Flags not showing in output
hi all !
I have a alv program which displays customer data.there are three deletion flags columns in the output.
First deletion flag will be: KNA1-LOEVM
Second deletion flag will be: KNB1-LOEVM
Third deletion flag will be: KNVV-LOEVM
earlier all three were showing.but now no one is showing.i'm pasting my code here if any expert can have a look and find out the BUG.
CODE STARTS----
report zqsdcap_cust.
INCLUDE DECLARATIONS
include:
ziabapcapph_macros. "Holcim Useful Macros
TABLE DECLARATIONS
tables:
tvko, "Org. Unit: Sales Organizations
t001, "Company codes
kna1, "Customer Master
knvv, "Customer master sales
knvi, "Customer tax classificat'n
knb1, "Customer master company code
<<CR003-DEVK949538 start ins
adr6. "SMTP numbers
<<CR003-DEVK949538 end ins
TYPE DECLARATIONS
type-pools:
slis.
STRUCTURE DECLARATIONS
Define structure for keep data in ALV list
data: begin of gs_output_list,
vkorg like knvv-vkorg, "Sales organization
ktokd like kna1-ktokd, "Customer A/C grp
kunnr like kna1-kunnr, "Customer number
vtweg like knvv-vtweg, "Distribution channel
name1 like kna1-name1, "Name1
name3 like kna1-name3, "Name3
name4 like kna1-name4, "Name4
stras like kna1-stras, "Street
cityc like kna1-cityc, "City
bezei1 like t005h-bezei, "Sales office
land1 like kna1-land1, "Country
regio like kna1-regio, "Region
bezei2 like t005u-bezei, "Region decription
kdgrp like knvv-kdgrp, "Customer group
ktext like t151t-ktext, "Cust grp name
bzirk like knvv-bzirk, "Sales district
bztxt like t171t-bztxt, "Description
zterm like knvv-zterm, "Payment term
lzone like kna1-lzone, "Transport zone
vtext like tzont-vtext, "Description
erdat like kna1-erdat, "Creation date
end of gs_output_list.
Internal table for customer tax data
data: begin of gs_output_tax,
vkorg like knvv-vkorg, "Sales organization
kunnr like kna1-kunnr, "Customer number
vtweg like knvv-vtweg, "Distribution channel
name1 like kna1-name1, "Name1
name3 like kna1-name3, "Name3
name4 like kna1-name4, "Name4
ort01 like kna1-ort01, "City
stcd1 like kna1-stcd1, "STD code
spart like knvv-spart, "Division
taxkd like knvi-taxkd, "Tax classific'n
tatyp like knvi-tatyp, "Tax category
vtext like tskdt-vtext, "Tax description
end of gs_output_tax.
Internal table for HVL customer master
data: begin of gs_output_hvl,
kunnr like kna1-kunnr, "Customer number
stceg like kna1-stceg, "VAT registration no
telfx like kna1-telfx, "Fax number
telf1 like kna1-telf1, "First telephone number
stras like kna1-stras, "House number and stret
ort02 like kna1-ort02, "District
cityc like kna1-cityc, "City code
bezei like t005h-bezei, "City description
regio like kna1-regio, "Region
ort01 like kna1-ort01, "City
name2 like kna1-name2, "Name2
name1 like kna1-name1, "Name1
bzirk like knvv-bzirk, "Sales district
spart like knvv-spart, "Division
vtweg like knvv-vtweg, "Distribution channel
vkorg like knvv-vkorg, "Sales organization
end of gs_output_hvl.
Internal table for customer database CRM
data: begin of gs_output_crm,
vkorg like knvv-vkorg, "Sales organization
vtweg like knvv-vtweg, "Distribution channel
bzirk like knvv-bzirk, "Sales district
kunnr like kna1-kunnr, "Customer number
name1 like kna1-name1, "Name1
name2 like kna1-name2, "Name2
stras like kna1-stras, "House number street
ort01 like kna1-ort01, "City
ort02 like kna1-ort02, "District
pstlz like kna1-pstlz, "Postal code
cityc like kna1-cityc, "City code
telf1 like kna1-telf1, "First telephone number
telfx like kna1-telfx, "Fax number
vkbur like knvv-vkbur, "Sales office
regio like kna1-regio, "Region
vkgrp like knvv-vkgrp, "Sales group
kdgrp like knvv-kdgrp, "Customer group
kvgr3 like knvv-kvgr3, "Customer group 3
altkn like knb1-altkn, "Previous record number
erdat like knvv-erdat, "Creation date
found_dat like zcrm_bp_ext-found_dat, "Found date
<<CR000-DEVK943142 start del
versg like knvv-versg, "Customer statistic grp
bukrs like knb1-bukrs, "Company code
<<CR000-DEVK943142 end del
end of gs_output_crm.
Internal table for customer information
data: begin of gs_output_info,
kunnr like kna1-kunnr, "Customer number
vkorg like knvv-vkorg, "Sales organization
vtweg like knvv-vtweg, "Distribution channel
stcd2 like kna1-stcd2, "Tax code
name1 like kna1-name1, "Name1
name2 like kna1-name2, "Name2
<<CR002-DEVK944835 start ins
name3 like kna1-name3, "Name3
<<CR002-DEVK944835 end ins
stras like kna1-stras, "House number street
ort01 like kna1-ort01, "City
ort02 like kna1-ort02, "District
pstlz like kna1-pstlz, "Postal code
regio like kna1-regio, "Region
land1 like kna1-land1, "Country code
cityc like kna1-cityc, "City code
telf1 like kna1-telf1, "First telephone number
telfx like kna1-telfx, "Fax number
<<CR001-DEVK944239 start ins
bzirk like knvv-bzirk, "Sales District
vkbur like knvv-vkbur, "Sales Office
kdgrp like knvv-kdgrp, "Customer group
<<CR001-DEVK944239 end ins
vkgrp like knvv-vkgrp, "Sales group
kvgr3 like knvv-kvgr3, "Customer group 3
versg like knvv-versg, "Customer stat grp
kdkg2 like kna1-kdkg2, "Customer condition gp2
kdkg1 like kna1-kdkg1, "Customer condition gp1
<<CR001-DEVK944239 start del
kdgrp like knvv-kdgrp, "Customer group
<<CR001-DEVK944239 end del
altkn like knb1-altkn, "Previous record#
erdat like knvv-erdat, "Creation date
note_text(200) type c, "<<CR003-DEVK949538 ins
smtp_addr like adr6-smtp_addr, "<<CR003-DEVK949538 ins
loevm1 like kna1-loevm, "Deletion flag all
loevm2 like knb1-loevm, "Deletion flag Cd
loevm3 like knvv-loevm, "Deletion flag sal
end of gs_output_info.
ALV Grid Declaration
data:
gs_fieldcat type slis_fieldcat_alv,
gs_layout type slis_layout_alv,
gs_event type slis_t_event,
gs_variant like disvariant,
gs_sort_info type slis_sortinfo_alv,
gs_exit_caused_by_user type slis_exit_by_user,
gs_tabname type slis_tabname,
gs_header type slis_entry.
INTERNAL TABLE DECLARATIONS
Define internal table for keep data in ALV list
data:
gt_output_list like table of gs_output_list,
gt_output_tax like table of gs_output_tax,
gt_output_hvl like table of gs_output_hvl,
gt_output_crm like table of gs_output_crm,
gt_output_info like table of gs_output_info,
<<CR003-DEVK949538 start ins
gv_text like tline occurs 0 with header line,
<<CR003-DEVK949538 start ins
ALV Grid Declaration
gt_fieldcat type slis_t_fieldcat_alv,
gt_list_top_of_page type slis_t_listheader,
gt_list_top_of_page2 type slis_t_listheader,
gt_sort_info type slis_t_sortinfo_alv.
VARIABLE DECLARATIONS
data:
ALV Grid Declaration
gv_save,
gv_exit_caused_by_caller,
gv_repid type sy-repid,
gv_user_command type slis_formname value 'USER_COMMAND',
gv_top_of_page type slis_formname value 'TOP_OF_PAGE',
gv_top_of_list type slis_formname value 'TOP_OF_LIST',
gv_end_of_list type slis_formname value 'END_OF_LIST',
lv_store like thead-tdname, "<<CR003-DEVK949538 ins
lv_id like thead-tdid, "<<CR003-DEVK949538 ins
lv_lines type i. "<<CR003-DEVK949538 ins
SELECTION SCREEN DECLARATIONS
Define selection-screen of query
selection-screen: begin of block blk with frame title text-001.
select-options: s_vkorg for knvv-vkorg "Sales org
obligatory
memory id vko,
s_bzirk for knvv-bzirk, "Sales district
s_vtweg for knvv-vtweg, "Dist channel
s_spart for knvv-spart "Division
default 'CM',
s_taxkd for knvi-taxkd, "Tax classific'n
s_kunnr for kna1-kunnr, "Customer number
s_regio for kna1-regio, "Region
s_kdgrp for knvv-kdgrp, "Customer group
s_vkgrp for knvv-vkgrp, "Sales group
s_vkbur for knvv-vkbur, "Sales office
s_lzone for kna1-lzone, "Zone
s_erdat for kna1-erdat, "Creation date
s_zuawa for knb1-zuawa, "Key for sorting
s_ktokd for kna1-ktokd, "Customer A/C grp
s_altkn for knb1-altkn, "Previous rec no
s_bukrs for knb1-bukrs "Company code
obligatory
memory id buk,
s_loevm1 for kna1-loevm, "Deletion flag all
s_loevm2 for knb1-loevm, "Deletion flag Cd
s_loevm3 for knvv-loevm. "Deletion flag sal
selection-screen: end of block blk.
selection-screen: begin of block b2 with frame title text-002.
parameters: pr_cust1 radiobutton group a1
default 'X'
user-command bkg,
pr_cust2 radiobutton group a1,
pr_cust3 radiobutton group a1,
pr_cust4 radiobutton group a1,
pr_cust5 radiobutton group a1.
selection-screen: end of block b2.
AT SELECTION-SCREEN ON S_VKORG
at selection-screen on s_vkorg.
select vkorg
into tvko-vkorg
from tvko
where vkorg in s_vkorg.
authorization check for sales org.
authority-check object 'V_VBRK_VKO'
id 'VKORG' field tvko-vkorg
id 'ACTVT' field '03'.
check sy-subrc ne 0.
message e002(zgen) with 'No authorization for sales org.'
tvko-vkorg.
endselect.
AT SELECTION-SCREEN ON S_BUKRS
at selection-screen on s_bukrs.
if pr_cust4 eq 'X' or
pr_cust5 eq 'X'.
select bukrs
into t001-bukrs
from t001
where bukrs in s_bukrs.
authorization check for plant and company code
authority-check object 'A_S_WERK'
id 'BUKRS' field t001-bukrs
id 'WERKS' dummy.
check sy-subrc ne 0.
message e002(zgen) with 'No authorization for this company code.'
t001-bukrs.
endselect.
endif.
AT SELECTION-SCREEN OUTPUT
at selection-screen output.
loop at screen .
if pr_cust1 eq 'X'.
if screen-name = 'S_VTWEG-LOW' or
screen-name = 'S_VTWEG-HIGH' or
screen-name = 'S_SPART-LOW' or
screen-name = 'S_SPART-HIGH' or
screen-name = 'S_TAXKD-LOW' or
screen-name = 'S_TAXKD-HIGH' or
screen-name = 'S_BUKRS-LOW' or
screen-name = 'S_BUKRS-HIGH' or
screen-name = 'S_ERDAT-LOW' or
screen-name = 'S_ERDAT-HIGH' or
screen-name = 'S_ALTKN-LOW' or
screen-name = 'S_ALTKN-HIGH' or
screen-name = 'S_VKBUR-LOW' or
screen-name = 'S_VKBUR-HIGH' or
screen-name = 'S_LOEVM1-LOW' or
screen-name = 'S_LOEVM1-HIGH' or
screen-name = 'S_LOEVM2-LOW' or
screen-name = 'S_LOEVM2-HIGH' or
screen-name = 'S_LOEVM3-LOW' or
screen-name = 'S_LOEVM3-HIGH'.
screen-input = 0.
endif.
elseif pr_cust2 eq 'X'.
if screen-name = 'S_BZIRK-LOW' or
screen-name = 'S_BZIRK-HIGH' or
screen-name = 'S_KDGRP-LOW' or
screen-name = 'S_KDGRP-HIGH' or
screen-name = 'S_LZONE-LOW' or
screen-name = 'S_LZONE-HIGH' or
screen-name = 'S_KTOKD-LOW' or
screen-name = 'S_KTOKD-HIGH' or
screen-name = 'S_ERDAT-LOW' or
screen-name = 'S_ERDAT-HIGH' or
screen-name = 'S_KTOKD-LOW' or
screen-name = 'S_KTOKD-HIGH' or
screen-name = 'S_ALTKN-LOW' or
screen-name = 'S_ALTKN-HIGH' or
screen-name = 'S_VKBUR-LOW' or
screen-name = 'S_VKBUR-HIGH' or
screen-name = 'S_LOEVM1-LOW' or
screen-name = 'S_LOEVM1-HIGH' or
screen-name = 'S_LOEVM2-LOW' or
screen-name = 'S_LOEVM2-HIGH' or
screen-name = 'S_LOEVM3-LOW' or
screen-name = 'S_LOEVM3-HIGH' or
screen-name = 'S_BUKRS-LOW' or
screen-name = 'S_BUKRS-HIGH' or
screen-name = 'S_VKGRP-LOW' or
screen-name = 'S_VKGRP-HIGH'.
screen-input = 0.
endif.
elseif pr_cust3 eq 'X'.
if screen-name = 'S_BZIRK-LOW' or
screen-name = 'S_BZIRK-HIGH' or
screen-name = 'S_KDGRP-LOW' or
screen-name = 'S_KDGRP-HIGH' or
screen-name = 'S_LZONE-LOW' or
screen-name = 'S_LZONE-HIGH' or
screen-name = 'S_ERDAT-LOW' or
screen-name = 'S_ERDAT-HIGH' or
screen-name = 'S_KTOKD-LOW' or
screen-name = 'S_KTOKD-HIGH' or
screen-name = 'S_SPART-LOW' or
screen-name = 'S_SPART-HIGH' or
screen-name = 'S_TAXKD-LOW' or
screen-name = 'S_TAXKD-HIGH' or
screen-name = 'S_REGIO-LOW' or
screen-name = 'S_REGIO-HIGH' or
screen-name = 'S_ALTKN-LOW' or
screen-name = 'S_ALTKN-HIGH' or
screen-name = 'S_VKBUR-LOW' or
screen-name = 'S_VKBUR-HIGH' or
screen-name = 'S_LOEVM1-LOW' or
screen-name = 'S_LOEVM1-HIGH' or
screen-name = 'S_LOEVM2-LOW' or
screen-name = 'S_LOEVM2-HIGH' or
screen-name = 'S_LOEVM3-LOW' or
screen-name = 'S_LOEVM3-HIGH' or
screen-name = 'S_BUKRS-LOW' or
screen-name = 'S_BUKRS-HIGH' or
screen-name = 'S_VKGRP-LOW' or
screen-name = 'S_VKGRP-HIGH' or
screen-name = 'S_VTWEG-LOW' or
screen-name = 'S_VTWEG-HIGH'.
screen-input = 0.
endif.
elseif pr_cust4 eq 'X'.
if screen-name = 'S_LZONE-LOW' or
screen-name = 'S_LZONE-HIGH' or
screen-name = 'S_TAXKD-LOW' or
screen-name = 'S_TAXKD-HIGH' or
screen-name = 'S_REGIO-LOW' or
screen-name = 'S_REGIO-HIGH' or
screen-name = 'S_ZUAWA-LOW' or
screen-name = 'S_ZUAWA-HIGH'.
screen-input = 0.
endif.
else.
if screen-name = 'S_LZONE-LOW' or
screen-name = 'S_LZONE-HIGH' or
screen-name = 'S_TAXKD-LOW' or
screen-name = 'S_TAXKD-HIGH'.
screen-input = 0.
endif.
endif.
modify screen.
endloop.
INITIALIZATION
initialization.
perform deactivate_program using sy-cprog.
START OF SELECTION
start-of-selection.
Customized function to get data from database table
perform get_data.
<<CR003-DEVK949538 start ins
perform get_internal_note_text tables gt_output_info.
<<CR003-DEVK949538 end ins
Create sort of ALV list
perform build_sort.
Send data to ALV list to display
if pr_cust1 eq 'X'.
gs_tabname = text-003.
gs_header = text-004.
perform write_alv_report tables gt_output_list
gt_sort_info.
elseif pr_cust2 eq 'X'.
gs_tabname = text-005.
gs_header = text-006.
perform write_alv_report tables gt_output_tax
gt_sort_info.
elseif pr_cust3 eq 'X'.
gs_tabname = text-007.
gs_header = text-008.
perform write_alv_report tables gt_output_hvl
gt_sort_info.
elseif pr_cust4 eq 'X'.
gs_tabname = text-009.
gs_header = text-010.
perform write_alv_report tables gt_output_crm
gt_sort_info.
else.
gs_tabname = text-011.
gs_header = text-012.
perform write_alv_report tables gt_output_info
gt_sort_info .
endif.
FORM EVENTTAB_FIELD
Fill Event tab, for ALV Grid Display
form eventtab_field using gs_events type slis_t_event.
data:
ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gs_events.
read table gs_events with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move gv_top_of_page to ls_event-form.
append ls_event to gs_events.
endif.
endform. " eventtab_field
FORM TOP_OF_PAGE
Write at Top of Page of ALV grid
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
endform. "top_of_page
FORM COMMENT_BUILD
Write header of ALV grid
form comment_build using lt_top_of_page type slis_t_listheader
gs_header.
data:
lv_tdate(10),
lv_fdate(10),
ls_line type slis_listheader.
clear: ls_line.
ls_line-typ = 'H'.
ls_line-info = gs_header.
append ls_line to lt_top_of_page.
endform. "comment_build
FORM INIT_FIELDCAT
Fill Field Catalog for ALV Grid
form init_fieldcat using gs_tabname.
refresh: gt_fieldcat.
use this function to get the all fields in the structure.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = gv_repid
i_internal_tabname = gs_tabname
i_inclname = gv_repid
changing
ct_fieldcat = gt_fieldcat.
if sy-subrc eq 0.
clear mark for key field to set color of key column
gs_fieldcat-key = ''.
modify gt_fieldcat from gs_fieldcat transporting key
where fieldname ne space.
read table gt_fieldcat with key fieldname = 'FOUND_DAT'
into gs_fieldcat.
gs_fieldcat-seltext_l = text-013.
modify gt_fieldcat from gs_fieldcat
transporting seltext_l
where fieldname = 'FOUND_DAT'.
<<CR003-DEVK949538 start ins
read table gt_fieldcat with key fieldname = 'NOTE_TEXT'
into gs_fieldcat.
gs_fieldcat-seltext_l = text-014.
modify gt_fieldcat from gs_fieldcat
transporting seltext_l
where fieldname = 'NOTE_TEXT'.
<<CR003-DEVK949538 start ins
endif.
endform. "init_fieldcat
FORM INIT_LAYOUT
Layout initial
form init_layout using gs_layout type slis_layout_alv.
gs_layout-info_fieldname = 'LINECOLOR'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
endform. " init_layout
FORM WRITE_ALV_REPORT
form write_alv_report tables gt_output
gt_sort_info.
ALV Grid display
clear: gv_repid,
gv_save.
gv_repid = sy-repid.
gs_variant-report = gv_repid.
gv_save = 'A'.
Build fieldcatalog
perform init_fieldcat using gs_tabname.
Build list events
perform eventtab_field using gs_event.
Show in ALV Grid form
perform init_layout using gs_layout.
Build comments
perform comment_build using gt_list_top_of_page[]
gs_header.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_buffer_active = ' '
i_callback_program = gv_repid
is_layout = gs_layout
i_save = gv_save
is_variant = gs_variant
it_events = gs_event[]
it_sort = gt_sort_info[]
it_fieldcat = gt_fieldcat[]
importing
e_exit_caused_by_caller = gv_exit_caused_by_caller
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = gt_output
exceptions
program_error = 1
others = 2.
endform. "write_alv_report
FORM GET_DATA
form get_data.
Get customer list
if pr_cust1 eq 'X'.
select knvv~vkorg
kna1~ktokd
kna1~kunnr
knvv~vtweg
kna1~name1
kna1~name3
kna1~name4
kna1~stras
kna1~cityc
kna1~regio
kna1~land1
knvv~kdgrp
knvv~bzirk
knvv~zterm
kna1~lzone
kna1~erdat
from kna1 join knvv
on kna1kunnr = knvvkunnr
into corresponding fields of table gt_output_list
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg
and knvv~bzirk in s_bzirk
and kna1~regio in s_regio
and knvv~kdgrp in s_kdgrp
and kna1~lzone in s_lzone
and kna1~erdat in s_erdat
and kna1~ktokd in s_ktokd.
loop at gt_output_list into gs_output_list.
Get City decsription
perform get_city_description using gs_output_list-cityc
changing gs_output_list-bezei1.
Get Region description
select single bezei
from t005u
into gs_output_list-bezei2
where bland = gs_output_list-regio
and land1 = gs_output_list-land1"<<CR000-DEVK942345 ins
and spras = sy-langu.
Get customer group description
select single ktext
from t151t
into gs_output_list-ktext
where kdgrp = gs_output_list-kdgrp
and spras = sy-langu.
Get sales district description
select single bztxt
from t171t
into gs_output_list-bztxt
where bzirk = gs_output_list-bzirk
and spras = sy-langu.
Get zone decription
select single vtext
from tzont
into gs_output_list-vtext
where zone1 = gs_output_list-lzone
and spras = sy-langu.
modify gt_output_list from gs_output_list index sy-tabix
transporting bezei1
bezei2
ktext
bztxt
vtext.
clear gs_output_list.
endloop.
Get customer tax data
elseif pr_cust2 eq 'X'.
select kna1~kunnr
kna1~name1
kna1~name3
kna1~name4
kna1~ort01
kna1~stcd1
knvv~vkorg
knvv~spart
knvv~vtweg
knvi~taxkd
knvi~tatyp
from kna1 join knvv
on kna1kunnr = knvvkunnr
join knvi
on kna1kunnr = knvikunnr
into corresponding fields of table gt_output_tax
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg
and knvv~vtweg in s_vtweg
and knvv~spart in s_spart
and kna1~regio in s_regio
and knvi~taxkd in s_taxkd.
Get customer tax description
loop at gt_output_tax into gs_output_tax.
select single vtext
from tskdt
into gs_output_tax-vtext
where tatyp = gs_output_tax-tatyp
and taxkd = gs_output_tax-taxkd
and spras = sy-langu.
if sy-subrc eq 0.
modify gt_output_tax from gs_output_tax index sy-tabix
transporting vtext.
clear gs_output_tax.
endif.
endloop.
Get customer HVL data
elseif pr_cust3 eq 'X'.
select kna1~kunnr
kna1~stceg
kna1~telfx
kna1~telf1
kna1~stras
kna1~ort02
kna1~cityc
kna1~regio
kna1~ort01
kna1~name2
kna1~name1
knvv~bzirk
knvv~spart
knvv~vtweg
knvv~vkorg
from kna1 join knvv
on kna1kunnr = knvvkunnr
into corresponding fields of table gt_output_hvl
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg.
loop at gt_output_hvl into gs_output_hvl.
Get city description.
perform get_city_description using gs_output_hvl-cityc
changing gs_output_hvl-bezei.
if sy-subrc eq 0.
modify gt_output_hvl from gs_output_hvl index sy-tabix
transporting bezei.
clear gs_output_hvl.
endif.
endloop.
Get cust CRM data
elseif pr_cust4 eq 'X'.
select kna1~kunnr
knvv~versg "<<CR000-DEVK943142 del
knvv~vkorg
knvv~vtweg
knvv~bzirk
knvv~vkgrp
knvv~kdgrp
knvv~vkbur
kna1~name1
kna1~name2
kna1~ort01
kna1~pstlz
kna1~regio
kna1~stras
kna1~telf1
kna1~telfx
kna1~ort02
kna1~cityc
knvv~kvgr3
knb1~altkn
knb1~bukrs "<<CR000-DEVK943142 del
knvv~erdat
zcrm_bp_ext~found_dat
from kna1 join knvv
on kna1kunnr = knvvkunnr
join knb1
on knvvkunnr = knb1kunnr
join zcrm_bp_ext
on knb1kunnr = zcrm_bp_extkunnr
into corresponding fields of table gt_output_crm
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg
and knvv~vtweg in s_vtweg
and knvv~spart in s_spart
and knvv~bzirk in s_bzirk
and knvv~kdgrp in s_kdgrp
and knvv~vkgrp in s_vkgrp
and knvv~vkbur in s_vkbur
and knvv~erdat in s_erdat
and kna1~ktokd in s_ktokd
and kna1~loevm in s_loevm1
and knb1~loevm in s_loevm2
and knvv~loevm in s_loevm3
and knb1~bukrs in s_bukrs
and knb1~altkn in s_altkn.
else.
Get customer information
<<CR001-DEVK944342 start del
select kna1~kunnr
knvv~vkorg
knvv~vtweg
kna1~stcd2
kna1~name1
kna1~name2
kna1~ort01
kna1~land1
kna1~pstlz
kna1~regio
kna1~stras
kna1~telf1
kna1~telfx
knvv~bzirk "<<CR001-DEVK944239 ins
knvv~vkbur "<<CR001-DEVK944239 ins
kna1~ort02
kna1~cityc
knvv~vkgrp
knvv~kvgr3
knvv~versg
kna1~kdkg2
kna1~kdkg1
knvv~kdgrp
knb1~altkn
knvv~erdat
kna1~loevm
knb1~loevm
knvv~loevm
<<CR001-DEVK944342 end del
<<CR001-DEVK944342 start ins
select kna1~kunnr
knvv~vkorg
knvv~vtweg
kna1~stcd2
kna1~name1
kna1~name2
kna1~name3 "<<CR002-DEVK944835 ins
kna1~stras
kna1~ort01
kna1~ort02
kna1~pstlz
kna1~regio
kna1~land1
kna1~cityc
kna1~telf1
kna1~telfx
knvv~bzirk
knvv~vkbur
knvv~kdgrp
knvv~vkgrp
knvv~kvgr3
knvv~versg
kna1~kdkg2
kna1~kdkg1
knb1~altkn
knvv~erdat
kna1~loevm
knb1~loevm
knvv~loevm
<<CR001-DEVK944342 end ins
from kna1 join knvv
on kna1kunnr = knvvkunnr
join knb1
on kna1kunnr = knb1kunnr
<<CR001-DEVK944252 start del
into corresponding fields of table gt_output_info
<<CR001-DEVK944252 end del
<<CR003-DEVK949538 start del
into table gt_output_info "<<CR001-DEVK944342 ins
<<CR003-DEVK949538 end del
<<CR003-DEVK949538 start ins
into corresponding fields of table gt_output_info
<<CR003-DEVK949538 end ins
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg
and knvv~vtweg in s_vtweg
and knvv~spart in s_spart
and knvv~bzirk in s_bzirk
and knvv~kdgrp in s_kdgrp
and knvv~vkgrp in s_vkgrp
and knvv~vkbur in s_vkbur
and knvv~erdat in s_erdat
and kna1~ktokd in s_ktokd
and kna1~regio in s_regio
<<CR001-DEVK944252 start del
and kna1~loevm in s_loevm1
and knb1~loevm in s_loevm2
and knvv~loevm in s_loevm3
<<CR001-DEVK944252 end del
<<CR001-DEVK944252 start ins
and ( kna1~loevm in s_loevm1
or knb1~loevm in s_loevm2
or knvv~loevm in s_loevm3 )
<<CR001-DEVK944252 end ins
and knb1~zuawa in s_zuawa
and knb1~bukrs in s_bukrs
and knb1~altkn in s_altkn.
<<CR003-DEVK949538 start ins
loop at gt_output_info into gs_output_info.
select single adrnr
into kna1-adrnr
from kna1
where kunnr = gs_output_info-kunnr.
check sy-subrc eq 0.
select single smtp_addr
into adr6-smtp_addr
from adr6
where addrnumber = kna1-adrnr.
check sy-subrc eq 0.
gs_output_info-smtp_addr = adr6-smtp_addr.
modify gt_output_info from gs_output_info.
endloop.
<<CR003-DEVK949538 end ins
endif.
<<CR003-DEVK949538 start ins
loop at gt_output_info into gs_output_info.
lv_store = gs_output_info-loevm1.
endloop.
<<CR003-DEVK949538 end ins
endform.
FORM BUILD_SORT
form build_sort.
if pr_cust1 eq 'X' or
pr_cust2 eq 'X'.
clear gs_sort_info.
gs_sort_info-fieldname = 'VKORG'.
gs_sort_info-spos = 1.
gs_sort_info-up = 'X'.
append gs_sort_info to gt_sort_info.
endif.
clear gs_sort_info.
gs_sort_info-fieldname = 'KUNNR'.
gs_sorhi shivaji!
thx for the reply.
can u chk whether there is any problem with the queries or not.
regards
sachin -
Report for update of Material with deletion Flag from R/3 to SRM
Hi All,
Is any report for Updating material in SRM with deletion indicator for those deletion flag set in R/3...Check material status
IF mat_mmsta EQ '--'.
lv_msgv1 = iv_ordered_prod.
CALL FUNCTION 'BBP_PD_MSG_ADD'
EXPORTING
i_msgty = c_msgty_e
i_msgid = 'BBP_PD'
i_msgno = 426
i_msgv1 = lv_msgv1
EXCEPTIONS
log_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
PERFORM abort.
ENDIF.
IF c_on = c_off.
MESSAGE e426(bbp_pd) WITH lv_msgv1.
ENDIF.
ENDIF.
if not mat_lvorm is initial.
lv_msgv1 = iv_ordered_prod.
call function 'BBP_PD_MSG_ADD'
program name LBBP_PDIGPF2R
Check material in backend
CALL FUNCTION 'META_MATERIAL_READ'
EXPORTING
i_mtcom = ls_mtcom_eci
logical_system = iv_log_system
IMPORTING
e_mmsta = mat_mmsta
e_lvorm = mat_lvorm
EXCEPTIONS
mat_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
lv_msgv1 = iv_ordered_prod.
lv_msgv2 = iv_plant.
CALL FUNCTION 'BBP_PD_MSG_ADD'
EXPORTING
i_msgty = c_msgty_e
i_msgid = 'BBP_PD'
i_msgno = 275
i_msgv1 = lv_msgv1
i_msgv2 = lv_msgv2
EXCEPTIONS
log_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
PERFORM abort.
ENDIF.
IF c_on = c_off.
MESSAGE e275(bbp_pd) WITH lv_msgv1 lv_msgv2.
ENDIF.
ENDIF.
EXPORTING
i_msgty = c_msgty_e
i_msgid = 'BBP_PD'
i_msgno = 345
EXCEPTIONS
log_not_found = 1
others = 2.
if sy-subrc <> 0.
perform abort.
endif.
if c_on = c_off.
IN SRM PROGRAM LBBP_PDIGPF2R BBP_PD 345 throws message "product x is designed for deletion"
but it is validationg from fm 'META_MATERIAL_READ'
please close this thread
br
muthu -
Material deletion flag at storage location level is not working
I have a material that is created in some plants and also in some storage locations within each plant. If I mark the deletion flag at plant level I am not able to create a PO -> Me051 error message appears. Whereas if I mark the deletion flag at storage location level nothing appens. I am able to create a PO and also to create to goods receipt. Is there any customization that I should do in order to get the error message?
Thanks in advance.storage location level deletion flag is not checked at order creation.
it is assumed that you can change the storage location when you do the receipt.
MRP run is at plant level, so the requirement is valid even the storage location view is flagged for deletion. -
How to delete or activate the deletion flag for the sales order line item
Hi All,
I have one Cust order & with referance to that cust order one production order is created . The production order user has done the Goods issue with 261 movement type & GR wi 101 before 4 months back , & he has reverse the GR with 102 on todays date . but in materila master the variable prize is maintain thats why it is showing a differance in the cost .
User want to delete the Production order as well as the custemer order From MDO4 , So we have make the Production order TECO & save , it is gone form the MD04 but the Custumer order still there . It is not allow us to cancell or reject . We have tried to maintain the reason for rejection but it showing the message that you can not activate the deletion flag for the order .
Could you please Help me to find out the way how can i delete the custemer order ?
Thanks In advance
Regards
PiyushW ehave Settele that order & then activate the deletion flag for the order & then cancel the sales order.
-
Production order gets automat. deletion flag if a change in sales order hap
Dear friends,
I have the problem that there is a change in the sales order ( for example the customer) and then the already existing production order receives a deletion flag wich cannot be done undo.
For example, we receive a request for a sales and we create a sales order. Afterwards, we will create the sales order with the customer who gave us the request. Then we can directly start with the Engineering, purchasing and so on. After a period of time, it happens that the "real" customer is know. So, each sales order line item will be deliverd to another customer. This can be relevant for the export control if the customers are located in different countries.
At the time of adding or chanign the new customer and saving the already existing production order will receive the deletion flag.
For me this situation is strange as I would not expect that the production order would receive a deletion flag only because a change in the sales order occurs.
Can please anyone help!?
Thank you very much,
BjoernDear Friends,
thank you very much.
I found the problem and this is actually a funtionality comming from the export control checks. I forwarded this to our export control specialist as I dont see this as a production theme.
The problem was, that the customer was changed and it was a different country. In this case the export control was activated and the online check was not sucsessfull. In this case a production is not allowed anymore and the system directly deletes the production order independing in which status the order is.
Interesting function.
Thank you all! -
Production order gets automat. deletion flag if a change in sales order ha
Dear friends,
I have the problem that there is a change in the sales order ( for example the customer) and then the already existing production order receives a deletion flag wich cannot be done undo.
For example, we receive a request for a sales and we create a sales order. Afterwards, we will create the sales order with the customer who gave us the request. Then we can directly start with the Engineering, purchasing and so on. After a period of time, it happens that the "real" customer is know. So, each sales order line item will be deliverd to another customer. This can be relevant for the export control if the customers are located in different countries.
At the time of adding or chanign the new customer and saving the already existing production order will receive the deletion flag.
For me this situation is strange as I would not expect that the production order would receive a deletion flag only because a change in the sales order occurs.
Can please anyone help!?
Thank you very much,
BjoernDear Friends,
thank you very much.
I found the problem and this is actually a funtionality comming from the export control checks. I forwarded this to our export control specialist as I dont see this as a production theme.
The problem was, that the customer was changed and it was a different country. In this case the export control was activated and the online check was not sucsessfull. In this case a production is not allowed anymore and the system directly deletes the production order independing in which status the order is.
Interesting function.
Thank you all!
Maybe you are looking for
-
SD Flow program using For all entries.
using simple ALV grid: I have the urgent requirement of changing the following program using 'For all entries' instead of joins and I should not use 'TABLES' -- For top-of-page I need to get dynamic fields like if I select company code in the selecti
-
Back to a Mac or not???
To go back to a Mac or not that is the question more or less... My last experience with a Mac way System 7 days on a Mac IIsi. I have been using Windows for a while now and man, I'm am just tired of patch the patch, worms, spyware. The big question i
-
I just replaced my cracked screen with a new screen and now it won't respond
Plz plz plz help me what should I do??:(
-
please list the Cash Desk Tables. what are the important tables. from Rajesh
-
Format of PDF sent as a Spool list with SM36.
Hi all, I use to send reporting with the tool that this link ( http://wiki.sdn.sap.com/wiki/display/ABAP/SendSpoollistofbackgroundjobtoSAPinbox) describes, but I use the option 'distribution list'. The PDF file that the user receive in his inbox (e.g