Short Dump While Printing Good Receipt Using MIGO
I have copied standard program /SMB40/M07DR for printing Goods Receipt from MIGO for a purchase order.
I am getting a dump: ST22 (POSTING_ILLEGAL_STATEMENT)
Error analysis
There is probably an error in the program
"SAPLKKBL".
This program is triggered in the update task . there, the
following ABAP/4 statements are not allowed.
- CALL SCREEN
- CALL DIALOG
- CALL TRANSACTI
- SUBMIT
Looked for many SAP NOTES but no luck.
When i check the short DUMP in ST22 , it gave me this information ..!!!!
error analysis
There is probably an error in the program
"SAPLKKBL".
This program is triggered in the update task. There, the
following ABAP/4 statements are not allowed:
- CALL SCREEN
- CALL DIALOG
- CALL TRANSACTION
- SUBMIT
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"POSTING_ILLEGAL_STATEMENT" " "
"SAPLKKBL" or "LKKBLU01"
"K_KKB_LIST_DISPLAY"
Similar Messages
-
Getting dump while posting goods receipt through TCode migo
Hi,
I am getting dump after I click on post button in TCode 'MIGO'.
Short text
The current application triggered a termination with a short dump.
Short text of error message:
Document number 9 5000000000 2010 was already assigned
Long text of error message:
Diagnosis
Document number 5000000000 in company code 9 and fiscal year 2010
has already been assigned.
System Response
Termination of processing.
Procedure
Check document number range 50 in company code 9 and fiscal year
2010 and correct the number range status if necessary.
Technical information about the message:
Message class....... "F5"
Number.............. 152
Variable 1.......... 9
Variable 2.......... 5000000000
Variable 3.......... 2010
Variable 4.......... 50
So please help me what I can do?
Thanks,
Moderator Message: The short dump is self-explanatory.
Edited by: kishan P on Nov 18, 2010 11:17 AMHi,
plx try to chane the status in IE02
Go to edit ,manual options , in that delete the HU assignemtn
and then save it and come out of it ..
Hope that helps -
How to change the g/l a/c being used while doing goods issue using migo
when I pass a migo entry whilie purchasing material
, the entry goes through stock
stock (230000 a/c no) 150 dr
GR/IR (150000 a/c) 150 cr
when I issue material after reservation for which again migo is done
entry is
repairs to plant and mach (4800569 a/c) 175
stock (230000 a/c no) 175
The stock a/c is debited and credited due to t.code obyc where for inventory posting I have assigned a/c 2300000 for valuation class assigned to material.
now I want to have a/c no 4800689 in place of 4800569. how can i change that.
that is when I issue material from stock this should be debited to 4800689 instead of 4800569. please provide t.code to change the gl from 4800689 from 4800569
full points will be awardedcontinuing my issue is it possible to that we donot have to change the gbb and vbr and still we can have the desired results.
that is we are able to use different gl for debit while doing goods issue from a single stocked material
or we want to have this result
1. repairs to p&m 1000 dr
stock of cement a/c 1000 cr
2. repairs to building 2000 dr
stock of cement a/c 2000 cr.
3. construction 3500 dr
stock of cement 3500 cr
we donot want to change the GBB and VBR every time or change the GL a/c while doing reservation.
is there any third option where we get the desired result without changing or entering the g/l manually
if there is please let me know the t.codes -
The total goods movement status not changed after goods receipt using MIGO
Dear gurus:
when i use T-code MIGO doing goods-receipt against Inbound delivery, the total goods movement status don't changed. i tryed VL32N to do goods receipt, and the status changed.
how can i do to make the status change when i receive goods in MIGO against inbound delivery?
best wishes,
DavidHi,
If your MM is integrated with WM (SU mgt or HUM) you have to post the GR with Inbound delivery.
Amit -
Short Dump While Changing reservation line using BAPI_ALM_ORDER_MAINTAIN
Hello!
I have a problem changing the reservation line using BAPI_ALM_ORDER_MAINTAIN. I am very sure that I am passing all correct parameters in BAPI. It gives short dump with type MESSAGE_TYPE_X and main program "SAPLCOBC" or "LCOBCU02" and "READ_RESB_IND". at line
Satz gefunden?
IF sy-subrc <> 0.
MESSAGE x901. "n779835
ENDIF.
This dump comes only when I run my Transfers workbench for the first time, when I run it for the second time, it executes correctly and reservation line gets changed successfully.
Does anyone have face such problem or have any ideas about how this can be solved??
Please let me know if you need more information......Hi Km,
Here is your answer:
SAP Note 1269069 - BAPI_ALM_ORDER_MAINTAIN: Runtime error MESSAGE_TYPE_X
https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1269069
Also henceforth Pls try to navigate through service market place if you find Issues with Standard SAP Program as somebody else might have faced the same and there must be solution readily available.
Let me know if it helps.
Regards
Shital
Edited by: shital phadake on Mar 23, 2009 6:59 PM -
Short Dump while acessing external tables using DB Connect
Hello SDN'rs,
I am getting Short dump (below) when i am trying to look into the table contents using DB Connect.
Please let me know how to resolve this problem. Is there any OSS Note on this??
External Database is Oracle; i can look into other tables.
ShrtText
Syntax error in program "GP_CREATE_STRUCTURE_DBCON_026 "
|What happened? |
| Error in ABAP application program. |
| |
| The current ABAP program "CL_RS_STRUC===================CP" had to be |
| terminated because one of the |
| statements could not be executed. |
| |
| This is probably due to an error in the ABAP program. |
| |
| In program "GP_CREATE_STRUCTURE_DBCON_026 ", the following syntax error |
| occurred |
| in the Include "GP_CREATE_STRUCTURE_DBCON_026 " in line 5: |
| "Type "D" can only have the length specification "8" or no length speci" |
| "fication at all." |
| " " |
| " " |
| |
| Author and last person to change the Include are: |
| Author "XYZ " |
| Last changed by "XYZ
|Error analysis |
| In program "GP_CREATE_STRUCTURE_DBCON_026 ", the following syntax error |
| occurred: |
| "Type "D" can only have the length specification "8" or no length speci" |
| "fication at all." |
| " " |
| " " |
Trigger Location of Runtime Error |
| Program CL_RS_STRUC===================CP |
| Include CL_RS_STRUC===================CM002 |
| Row 108 |
| Module type (METHOD) |
| Module Name CREATE
Thanks,
Faizee BWhen i tried today for the same table i am getting the shortdump description(below), I have noticed that the number have changed from 026 to 055, any thoughts why it happen and how it can be resolved?
In program "GP_CREATE_STRUCTURE_DBCON_055 ", the following syntax error
occurred in the Include "GP_CREATE_STRUCTURE_DBCON_055 " in line 5:
"Type "D" can only have the length specification "8" or no length specification at all."
Thanks,
Faizee B -
Attach document while Goods receipt in MIGO
Hi,
Can I attach a word or a pdf document while posting Goods receipt via MIGO.
In 'Service for Object' the option store document is not possible. It is grey out.
Do I need to do some settings to get this option so as to upload a file while posting the GR.
I am able to get the option while create/change PO but not in MIGO.
RegardsHi!
To attach business documents in MIGO you have to do a little bit customizing first...
In OAC0 check if a content repository is available.
In OAC2 enter the document type you want to attach
In OAC3 enter object type BUS2017 with your document type, content repository etc.
You can attach documents only after the posting because until then SAP has no fix document number which is the key/link to the document. So display the posted material document again and then you can attach the business document.
Greeting -
Changing the G/L Account while Posting the Goods Receipts in MIGO
Hi All,
I have requirement in which G/L Account needs to be changed based on some validation while Posting the Goods Receipt in MIGO.
I have created exit in OBBH by copying the standard SAP Program RGGBS800 in view V_T80D.
I changed following entry in view V_T80D:
GBLS ZGGBS800 Val/sub:Exits for substitution
Now Inside program ZGGBS800, I have written the logic to change the BSEG-HKONT value with the new G/L Account which gets called inside the standard function module G_VSR_SUBSTITUTION_CALL.
FORM U999.
DATA : V_HKONT TYPE BSEG-HKONT.
clear : V_HKONT.
SELECT SINGLE SAKNR FROM ZMASH1 INTO V_HKONT WHERE MATNR = BSEG-MATNR AND WERKS = BSEG-WERKS.
IF SY-SUBRC EQ 0.
BSEG-HKONT = V_HKONT.
ENDIF.
ENDFORM.
After the execution of the above code the value of BSEG-HKONT changes with new value of V_HKONT but after this when I go further in Standard SAP code of function module G_VSR_SUBSTITUTION_CALL, there is one subroutine FORM EXP_TAB_009_BSEG being called which changes the value of BSEG-HKONT to initial value of HKONT also while moving the data from BSEG to TEMP_STRUCT it doesn't passes the HKONT value, which I want it be passed as I want the changed value to be passed finally to OUT_RESULT. Please look at the code below.
Following is the SAP standard code of subroutione FORM EXP_TAB_009_BSEG :
FORM EXP_TAB_009_BSEG
USING
IN_ORIG STRUCTURE BSEG
CHANGING
OUT_RESULT STRUCTURE BSEG
B_RESULT.
DATA: ORIG LIKE BSEG.
DATA: BEGIN OF TEMP_STRUCT,
ABPER LIKE BSEG-ABPER,
AUGGJ LIKE BSEG-AUGGJ,
DOCLN LIKE BSEG-DOCLN,
FIPOS LIKE BSEG-FIPOS,
FISTL LIKE BSEG-FISTL,
FKBER LIKE BSEG-FKBER,
FKBER_LONG LIKE BSEG-FKBER_LONG,
GEBER LIKE BSEG-GEBER,
GMVKZ LIKE BSEG-GMVKZ,
GRANT_NBR LIKE BSEG-GRANT_NBR,
HKTID LIKE BSEG-HKTID,
HZUON LIKE BSEG-HZUON,
INTRENO LIKE BSEG-INTRENO,
MEASURE LIKE BSEG-MEASURE,
PARGB LIKE BSEG-PARGB,
PPA_EX_IND LIKE BSEG-PPA_EX_IND,
PPRCT LIKE BSEG-PPRCT,
PRCTR LIKE BSEG-PRCTR,
PRODPER LIKE BSEG-PRODPER,
PRZNR LIKE BSEG-PRZNR,
PSEGMENT LIKE BSEG-PSEGMENT,
SAMNR LIKE BSEG-SAMNR,
SCTAX LIKE BSEG-SCTAX,
SEGMENT LIKE BSEG-SEGMENT,
SGTXT LIKE BSEG-SGTXT,
SRTYPE LIKE BSEG-SRTYPE,
UZAWE LIKE BSEG-UZAWE,
XREF1 LIKE BSEG-XREF1,
XREF2 LIKE BSEG-XREF2,
XREF3 LIKE BSEG-XREF3,
ZUONR LIKE BSEG-ZUONR,
ZZBUSPARTN LIKE BSEG-ZZBUSPARTN,
ZZCHAN LIKE BSEG-ZZCHAN,
ZZLOB LIKE BSEG-ZZLOB,
ZZLOCA LIKE BSEG-ZZLOCA,
ZZPRODUCT LIKE BSEG-ZZPRODUCT,
ZZREGION LIKE BSEG-ZZREGION,
ZZSPREG LIKE BSEG-ZZSPREG,
ZZSTATE LIKE BSEG-ZZSTATE,
ZZUSERFLD1 LIKE BSEG-ZZUSERFLD1,
ZZUSERFLD2 LIKE BSEG-ZZUSERFLD2,
ZZUSERFLD3 LIKE BSEG-ZZUSERFLD3,
END OF TEMP_STRUCT.
IF IN_ORIG = BSEG .
B_RESULT = B_FALSE.
OUT_RESULT = IN_ORIG.
EXIT.
ENDIF.
MOVE-CORRESPONDING BSEG TO TEMP_STRUCT.
OUT_RESULT = IN_ORIG.
MOVE-CORRESPONDING TEMP_STRUCT TO OUT_RESULT.
IF IN_ORIG = OUT_RESULT .
B_RESULT = B_FALSE.
ELSE.
B_RESULT = B_TRUE.
ENDIF.
BSEG = OUT_RESULT.
ENDFORM. " EXP_TAB_009_BSEG
I need the value of BSEG-HKONT should be passed to OUT_RESULT-HKONT.
I am not able to find any userexit or BADI for this.
Please guide me on this.
Thanks,
Chandravadan
Edited by: Chandravadan Jaiswal on May 8, 2009 2:18 PM
Edited by: Chandravadan Jaiswal on May 8, 2009 3:45 PMHi
I also need to change hkont while posting MIGO and MIRO transaction..
Any suggestion for this?
Here's my problem.. Substitution of account(HKONT) when posting in MIGO/MIRO -
Short dump while using BAPI_PO_CREATE1
Hi all,
I am facing this short dump while executing my program that uses BAPI_PO_CREATE1.
The error is 'Exception condition "failure" raised'.
The trigger location of runtime error is
Program : CL_HANDLE_MANAGER_MM====================CP
Include: CL_HANDLE_MANAGER_MM=====================CM005
Module name: GET
Source code:
Method GET.
If my_manager is initial.
Call method get_manager.
endif.
call method my_manager-> search EXporting im_id = im_id
Importing ex_handle = ex_handle
Exceptions failure = 01.
If sy-subrc <>0.
raise failure.
endif.
I am a beginner in ABAP. Plz help.Hi ,
I faced the similar situation once , in my case when i passed the Delivery indicator value in the Item Table as well as Itemx Table , i was facing this error .
what i suggest you is to pass it at the Item table only , not at the itemx Table.
it worked for me .
try this and reply for the same. -
Short Dump while using BAPI_PS_PRECOMMIT to set Project Definition Status
Hi All,
I am getting a short dump while using BAPI_PS_PRECOMMIT for setting the Project Definition status..
The requirement is to create a Project Definition and then set its status to REL from CRTD. For this purpose i am using the BAPI's in the following sequence :
1. BAPI_PS_INITIALIZATION
2. BAPI_PROJECT_MAINTAIN
3. BAPI_BUS2001_SET_STATUS
4. BAPI_PS_PRECOMMIT
5. BAPI_TRANSACTION_COMMIT
The Proj Def creation is happening successfully in step2. Interestingly, when I debug the program and stop at PRECOMMIT BAPI the program does not give a dump. I have also tried to give COMMIT WORK / WAIT FOR n SECONDS after BAPI_BUS2001_SET_STATUS, to give BAPI sometime for DB update but nothing seems to be a permanent solution.
Please give your views on a solution for this problem..
Thanks & Regards,
SomilCan you please check how to post code in SDN ...
I cannot read your code properly -
Short dumps while using J3A9 & VK12
We are implementing SAP ECC 6.0 and are experiencing short dumps while using transactions J3A9 and VK12. They all point to program /AFS/SD_DISP_CONDITION_TABLE and related Includes. I haven't found any information regarding this program on this site or in OSS, mostly due to the fact that the program is only 2 months old, which is troubling enough...
If anyone is experiencing similar issues, please feel free to respond. I have opened an OSS note with SAP and they are having trouble recreating the issue as it doesn't happen consistently.
Thanks and best regards,
Chris MowlWe are implementing SAP ECC 6.0 and are experiencing short dumps while using transactions J3A9 and VK12. They all point to program /AFS/SD_DISP_CONDITION_TABLE and related Includes. I haven't found any information regarding this program on this site or in OSS, mostly due to the fact that the program is only 2 months old, which is troubling enough...
If anyone is experiencing similar issues, please feel free to respond. I have opened an OSS note with SAP and they are having trouble recreating the issue as it doesn't happen consistently.
Thanks and best regards,
Chris Mowl
10/22/08: Several OSS notes have been created regarding this issue but none of them have solved it. The two most recent notes are 1262962 & 1225190. If you are having this problem. start with these notes. -
Confirm using BAPI_PRODORDCONF_CREATE_TT does not print Goods Receipt Slip
We are having issue when perform co11n confirmation, goods receipt slip prints out fine, but calling BAPI_PRODORDCONF_CREATE_TT using the same production order/operation does not print the Goods Receipt Slip. The automatic goods movement works fine with BAPI & co11n.
Has anyone else had this problem?
Thanks
DavidNagarajan,
We have been using this BAPI in production environment for over a year now and basically it has worked just fine. From what I understand, the Goods Receipt Slip has never printed when using this BAPI, but since we only had small areas that were using this BAPI (until recently), these areas either did not need the printed Goods Receipt Slip or a Warehouse was specified, so a Transfer Order was produced instead of GRS.
I was thinking maybe we were not populating one of the BAPI input fields properly, but not sure which one it would be. We currently do not populate the "Posting Date" input field, so thought I would try populating that.
To answer your question, yes, we do the commit work.
Thanks -
Short dump while export grid alv with subtotals.
hello,
its strange and i face first time that my grid alv report goin to short dump while i done subtotals and send it to local file thru export.
if am not doing subtotals then export it to local file it goin fine.
whats it has problem plz give ur helping hends.
here i copied a dump msg also.
Short text
Error at assignment: Overwritten protected field.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
A new value is to be assigned to the field "<L_UNIT>", although this field is
entirely or partly protected against changes.
The following are protected against changes:
- Character literals or numeric literals
- Constants (CONSTANTS)
- Parameters of the category IMPORTING REFERENCE for functions and
methods
- Untyped field symbols not yet assigned a field using ASSIGN
- TABLES parameters if the actual parameter is protected against changes
- USING reference parameters and CHANGING parameters for FORMs, if the
actual parameter is protected against changes and
- Accesses using field symbols if the field assigned using ASSIGN is
protected (or partially protected, e.g. key components of an internal
table with the type SORTED or HASHED TABLE) against changes
- Accesses using references, if the field bound to the reference is
protected (or partially protected) against changes
- External write accesses to READ-ONLY attributes,
- Content of a shared object area instance accessed using a shared lock
(ATTACH_FOR_READ).
regards amit.& Object Id : &
& Object Name : &
& Function Module Name : Sales Register &
& Transaction Code : &
& Author : Amit gujargoud &
& Module Name : SD &
& Sub-Module : &
& Program Type : Dialog Create Date : 02/02/2007 &
& SAP Release : ECC 6.0 &
& Description : Sales Register - Detail &
*& Report ZSALESREGISTER
REPORT zsd_salesregister.
*& TYPE-POOLS
TYPE-POOLS : slis.
*& TABLES
TABLES: vbrp, "Billing Document: Item Data
vbrk, "Billing Document: Header Data
lips, "SD document: Delivery: Item data
lfa1, "Vendor Master (General Section)
kna1, "General Data in Customer Master
vbak, "Sales Document: Header Data
vbpa, "Sales Document: Partner (Gopal)
likp, "SD Document: Delivery Header Data
vbap, "Sales Document: Item Data
vbkd, "Sales Document: Business Data
mara. "General Material Data
*& DATA DECLARATION
DATA: BEGIN OF i_report OCCURS 100,
vbeln LIKE vbrp-vbeln, "Billing Document
posnr LIKE vbrp-posnr,
matnr LIKE mara-matnr ,
aubel LIKE vbrp-aubel, "Sales Document
fkimg LIKE vbrp-fkimg, "Actual billed quantity
vrkme LIKE vbrp-vrkme, "Sales unit
arktx LIKE vbrp-arktx, "Short text for sales order item
vgbel LIKE vbrp-vgbel, "Doc number of the reference document
werks LIKE vbap-werks,
vkgrp LIKE vbrp-vkgrp,
fklmg LIKE vbrp-fklmg,
volum LIKE vbrp-volum,
vkbur LIKE vbrp-vkbur,
vtweg_auft LIKE vbrp-vtweg_auft,
auart LIKE vbak-auart,
tabix LIKE sy-tabix, "Internal Table, Current Row Index
name1 LIKE kna1-name1, "Name1
exnum LIKE j_1iexchdr-exnum, "Official Excise Document Number
orqty TYPE p DECIMALS 0,
penqty TYPE p DECIMALS 0, "Cumulative order qty in sls units
openqty TYPE p DECIMALS 0, "Cumulative order qty in sls units
ean11 LIKE lips-ean11, "International Article No(EAN/UPC)
volum LIKE lips-volum,
lgmng LIKE lips-lgmng,
traid LIKE likp-traid,
ort01 LIKE lfa1-ort01, "City
lifnr LIKE lfa1-lifnr, "A/c Number of Vendor or Creditor
netwr LIKE vbrp-netwr, "Net val of bill item in doc currency
kunnr LIKE vbak-kunnr, "Sold-to party
adrnr LIKE vbpa-adrnr, "Address
city1 LIKE adrc-city1, "City
tprtr LIKE lfa1-name1, "Name 1
knumv LIKE konv-knumv, "Number of the document condition
kposn LIKE konv-kposn,
rate LIKE konv-kbetr, "Rate (cond amount or percentage)
bas_val LIKE konv-kwert, "Rate (cond amount or percentage)
exc_duty LIKE konv-kwert, "Rate (cond amount or percentage)
ed_cess LIKE konv-kwert, "Rate (cond amount or percentage)
freight LIKE konv-kwert, "Rate (cond amount or percentage)
pack LIKE konv-kwert, "Rate (cond amount or percentage)
cst LIKE konv-kwert, "Rate (cond amount or percentage)
vat LIKE konv-kwert, "Rate (cond amount or percentage)
ent_tax LIKE konv-kwert, "Rate (cond amount or percentage)
tot_inv LIKE konv-kwert, "Rate (cond amount or percentage)
tot_inv_round LIKE konv-kwert, "Rate (cond amount or percentage)
disc_tot LIKE konv-kwert, "Discount total - Z001 to Z020
vat_rate LIKE konv-kbetr,
cst_rate LIKE konv-kbetr,
lst_rate LIKE konv-kbetr,
mwsbk LIKE vbrk-mwsbk,
bas_tax LIKE konv-kwert,
dev_tax LIKE konv-kwert,
tcs_tax LIKE konv-kwert,
bas_tot LIKE konv-kwert,
lst LIKE konv-kwert,
vkorg LIKE vbak-vkorg,
mvgr1 LIKE mvke-mvgr1,
mvgr2 LIKE mvke-mvgr2,
mvgr3 LIKE mvke-mvgr3,
mvgr4 LIKE mvke-mvgr4,
mvgr5 LIKE mvke-mvgr5,
text1 LIKE tvm1t-bezei,
text2 LIKE tvm1t-bezei,
text3 LIKE tvm1t-bezei,
text4 LIKE tvm1t-bezei,
text5 LIKE tvm1t-bezei,
bismit_area TYPE p DECIMALS 4, " Size (L*B) in mm
face_area TYPE p DECIMALS 2, " Face Area Declaration
notional_area TYPE p DECIMALS 2,
stock_pcs TYPE p , " decimals 3 Pcs of Stock
labst LIKE mard-labst, " Valuated Unrestricted-Use Stock
bismt LIKE mara-bismt, " Size (L*B) in mm
normt LIKE mara-normt, " Industry Standard Description
temp TYPE p DECIMALS 2,
temp1 TYPE p DECIMALS 2,
temp2 TYPE p DECIMALS 2,
temp3 TYPE p DECIMALS 2,
temp4 TYPE p DECIMALS 2,
temp5 TYPE p DECIMALS 2,
temp6 TYPE p DECIMALS 2,
temp7 TYPE p DECIMALS 2,
temp8 TYPE p DECIMALS 2,
temp9 TYPE p DECIMALS 2,
temp10 TYPE p DECIMALS 2,
temp11 TYPE p DECIMALS 2,
temp12 TYPE p DECIMALS 2,
temp13 TYPE p DECIMALS 0,
temp14 TYPE p DECIMALS 0,
temp15 TYPE p DECIMALS 0,
temp16 TYPE p DECIMALS 2,
temp17 TYPE p DECIMALS 2,
temp18 TYPE p DECIMALS 2,
temp19 TYPE p DECIMALS 2,
temp20 TYPE p DECIMALS 2,
temp21 TYPE p DECIMALS 2,
waybill(20) TYPE c,
audat LIKE vbak-audat, "Document Date (Date Received/Sent)
lgort LIKE vbap-lgort, "Storage location
lgobe LIKE t001l-lgobe, "Description of storage location
erdat LIKE vbrk-erdat, "Date on which the record was created
exdat LIKE j_1iexchdr-exdat, "Excise Document Date
vbtyp LIKE vbak-vbtyp, "SD document category
acdt LIKE likp-wadat_ist, "Actual goods movement date
fkdat LIKE vbrk-fkdat,
ship LIKE kna1-name1, "Name1 (Ship-to party)
fksto LIKE vbrk-fksto,
fkart LIKE vbrk-fkart,
bezei LIKE t005u-bezei,
vtweg LIKE vbak-vtweg,
spart LIKE vbak-spart,
matkl LIKE mara-matkl,
wgbez LIKE t023t-wgbez,
mtart LIKE mara-mtart,
labor LIKE mara-labor,
ferth LIKE mara-ferth,
lbtxt LIKE t024x-lbtxt,
niels LIKE kna1-niels,
kukla LIKE kna1-kukla,
desc LIKE tvkbt-bezei,
brsch LIKE kna1-brsch,
zeinr LIKE mara-zeinr,
bzirk LIKE vbrk-bzirk,
area_desc LIKE tnlst-bezei,
dist_desc TYPE tkukt-vtext,
taluka_desc TYPE t016t-brtxt,
sales_desc TYPE tvgrt-bezei,
kmein LIKE konv-kmein, "Sales Unit
challan LIKE likp-vbeln,
END OF i_report.
data for MVKE
DATA: BEGIN OF i_report_mvke OCCURS 0,
vbeln LIKE vbrp-vbeln, "Billing Document
aubel LIKE vbrp-aubel, "Sales Document
vkorg LIKE vbak-vkorg,
matnr LIKE mara-matnr ,
vtweg LIKE vbak-vtweg,
END OF i_report_mvke.
***********************TEMP COPY
DATA: BEGIN OF i_report_temp OCCURS 0,
vbeln LIKE vbrp-vbeln, "Billing Document
posnr LIKE vbrp-posnr,
matnr LIKE mara-matnr ,
aubel LIKE vbrp-aubel, "Sales Document
fkimg LIKE vbrp-fkimg, "Actual billed quantity
vrkme LIKE vbrp-vrkme, "Sales unit
arktx LIKE vbrp-arktx, "Short text for sales order item
vgbel LIKE vbrp-vgbel, "Doc number of the reference document
werks LIKE vbap-werks,
vkgrp LIKE vbrp-vkgrp,
fklmg LIKE vbrp-fklmg,
volum LIKE vbrp-volum,
vkbur LIKE vbrp-vkbur,
vtweg_auft LIKE vbrp-vtweg_auft,
auart LIKE vbak-auart,
tabix LIKE sy-tabix, "Internal Table, Current Row Index
name1 LIKE kna1-name1, "Name1
exnum LIKE j_1iexchdr-exnum, "Official Excise Document Number
orqty TYPE p DECIMALS 0,
penqty TYPE p DECIMALS 0, "Cumulative order qty in sls units
openqty TYPE p DECIMALS 0, "Cumulative order qty in sls units
ean11 LIKE lips-ean11, "International Article No(EAN/UPC)
volum LIKE lips-volum,
lgmng LIKE lips-lgmng,
traid LIKE likp-traid,
ort01 LIKE lfa1-ort01, "City
lifnr LIKE lfa1-lifnr, "A/c Number of Vendor or Creditor
netwr LIKE vbrp-netwr, "Net val of bill item in doc currency
kunnr LIKE vbak-kunnr, "Sold-to party
adrnr LIKE vbpa-adrnr, "Address
city1 LIKE adrc-city1, "City
tprtr LIKE lfa1-name1, "Name 1
knumv LIKE konv-knumv, "Number of the document condition
kposn LIKE konv-kposn,
rate LIKE konv-kbetr, "Rate (cond amount or percentage)
bas_val LIKE konv-kwert, "Rate (cond amount or percentage)
exc_duty LIKE konv-kwert, "Rate (cond amount or percentage)
ed_cess LIKE konv-kwert, "Rate (cond amount or percentage)
freight LIKE konv-kwert, "Rate (cond amount or percentage)
pack LIKE konv-kwert, "Rate (cond amount or percentage)
cst LIKE konv-kwert, "Rate (cond amount or percentage)
vat LIKE konv-kwert, "Rate (cond amount or percentage)
ent_tax LIKE konv-kwert, "Rate (cond amount or percentage)
tot_inv LIKE konv-kwert, "Rate (cond amount or percentage)
tot_inv_round LIKE konv-kwert, "Rate (cond amount or percentage)
disc_tot LIKE konv-kwert, "Discount total - Z001 to Z020
vat_rate LIKE konv-kbetr,
cst_rate LIKE konv-kbetr,
lst_rate LIKE konv-kbetr,
mwsbk LIKE vbrk-mwsbk,
bas_tax LIKE konv-kwert,
dev_tax LIKE konv-kwert,
tcs_tax LIKE konv-kwert,
bas_tot LIKE konv-kwert,
lst LIKE konv-kwert,
vkorg LIKE vbak-vkorg,
mvgr1 LIKE mvke-mvgr1,
mvgr2 LIKE mvke-mvgr2,
mvgr3 LIKE mvke-mvgr3,
mvgr4 LIKE mvke-mvgr4,
mvgr5 LIKE mvke-mvgr5,
text1 LIKE tvm1t-bezei,
text2 LIKE tvm1t-bezei,
text3 LIKE tvm1t-bezei,
text4 LIKE tvm1t-bezei,
text5 LIKE tvm1t-bezei,
bismit_area TYPE p DECIMALS 4, " Size (L*B) in mm
face_area TYPE p DECIMALS 2, " Face Area Declaration
notional_area TYPE p DECIMALS 2,
stock_pcs TYPE p , " decimals 3 Pcs of Stock
labst LIKE mard-labst, " Valuated Unrestricted-Use Stock
bismt LIKE mara-bismt, " Size (L*B) in mm
normt LIKE mara-normt, " Industry Standard Description
temp TYPE p DECIMALS 2,
temp1 TYPE p DECIMALS 2,
temp2 TYPE p DECIMALS 2,
temp3 TYPE p DECIMALS 2,
temp4 TYPE p DECIMALS 2,
temp5 TYPE p DECIMALS 2,
temp6 TYPE p DECIMALS 2,
temp7 TYPE p DECIMALS 2,
temp8 TYPE p DECIMALS 2,
temp9 TYPE p DECIMALS 2,
temp10 TYPE p DECIMALS 2,
temp11 TYPE p DECIMALS 2,
temp12 TYPE p DECIMALS 2,
temp13 TYPE p DECIMALS 0,
temp14 TYPE p DECIMALS 0,
temp15 TYPE p DECIMALS 0,
temp16 TYPE p DECIMALS 2,
temp17 TYPE p DECIMALS 2,
temp18 TYPE p DECIMALS 2,
temp19 TYPE p DECIMALS 2,
temp20 TYPE p DECIMALS 2,
temp21 TYPE p DECIMALS 2,
waybill(20) TYPE c,
audat LIKE vbak-audat, "Document Date (Date Received/Sent)
lgort LIKE vbap-lgort, "Storage location
lgobe LIKE t001l-lgobe, "Description of storage location
erdat LIKE vbrk-erdat, "Date on which the record was created
exdat LIKE j_1iexchdr-exdat, "Excise Document Date
vbtyp LIKE vbak-vbtyp, "SD document category
acdt LIKE likp-wadat_ist, "Actual goods movement date
fkdat LIKE vbrk-fkdat,
ship LIKE kna1-name1, "Name1 (Ship-to party)
fksto LIKE vbrk-fksto,
fkart LIKE vbrk-fkart,
bezei LIKE t005u-bezei,
vtweg LIKE vbak-vtweg,
spart LIKE vbak-spart,
matkl LIKE mara-matkl,
wgbez LIKE t023t-wgbez,
mtart LIKE mara-mtart,
labor LIKE mara-labor,
ferth LIKE mara-ferth,
lbtxt LIKE t024x-lbtxt,
niels LIKE kna1-niels,
kukla LIKE kna1-kukla,
desc LIKE tvkbt-bezei,
brsch LIKE kna1-brsch,
zeinr LIKE mara-zeinr,
bzirk LIKE vbrk-bzirk,
area_desc LIKE tnlst-bezei,
dist_desc TYPE tkukt-vtext,
taluka_desc TYPE t016t-brtxt,
sales_desc TYPE tvgrt-bezei,
kmein LIKE konv-kmein, "Sales Unit
challan LIKE likp-vbeln,
END OF i_report_temp.
DATA: BEGIN OF i_vbap OCCURS 0 ,
posnr LIKE vbap-posnr,
vbeln LIKE vbap-vbeln ,
matnr LIKE vbap-matnr ,
werks LIKE vbap-werks,
kwmeng LIKE vbap-kwmeng,
lgort LIKE vbap-lgort,
matkl LIKE mara-matkl,
wgbez LIKE t023t-wgbez,
mtart LIKE mara-mtart,
END OF i_vbap .
DATA : w_temp_cal(20) TYPE c.
DATA : w_face_area TYPE p DECIMALS 4,
w_notinal_area TYPE p DECIMALS 4.
**MVKE
DATA: BEGIN OF itab_mvke OCCURS 0,
matnr LIKE mvke-matnr,
vkorg LIKE vbak-vkorg,
vtweg LIKE mvke-vtweg,
mvgr1 LIKE mvke-mvgr1,
mvgr2 LIKE mvke-mvgr2,
mvgr3 LIKE mvke-mvgr3,
mvgr4 LIKE mvke-mvgr4,
mvgr5 LIKE mvke-mvgr5,
END OF itab_mvke.
**TVM1T
DATA : BEGIN OF itab_tvm1t OCCURS 0,
spras LIKE tvm1t-spras,
mvgr1 LIKE tvm1t-mvgr1,
bezei LIKE tvm1t-bezei,
END OF itab_tvm1t.
DATA : BEGIN OF itab_tvm2t OCCURS 0,
spras LIKE tvm2t-spras,
mvgr2 LIKE tvm2t-mvgr2,
bezei LIKE tvm2t-bezei,
END OF itab_tvm2t.
DATA : BEGIN OF itab_tvm3t OCCURS 0,
spras LIKE tvm3t-spras,
mvgr3 LIKE tvm3t-mvgr3,
bezei LIKE tvm3t-bezei,
END OF itab_tvm3t.
DATA : BEGIN OF itab_tvm4t OCCURS 0,
spras LIKE tvm4t-spras,
mvgr4 LIKE tvm4t-mvgr4,
bezei LIKE tvm4t-bezei,
END OF itab_tvm4t.
DATA : BEGIN OF itab_tvm5t OCCURS 0,
spras LIKE tvm5t-spras,
mvgr5 LIKE tvm5t-mvgr5,
bezei LIKE tvm5t-bezei,
END OF itab_tvm5t.
DATA: itab_t024x TYPE STANDARD TABLE OF t024x WITH HEADER LINE,
it_report LIKE LINE OF i_report OCCURS 0,
i_mvke LIKE LINE OF itab_mvke OCCURS 0.
**VBKD
DATA: BEGIN OF i_vbkd OCCURS 0 ,
vbeln LIKE vbkd-vbeln ,
posnr LIKE vbkd-posnr ,
bzirk LIKE vbkd-bzirk ,
END OF i_vbkd .
DATA: BEGIN OF i_lips OCCURS 0,
vbeln LIKE lips-vbeln,
ean11 LIKE lips-ean11,
volum LIKE lips-volum,
lgmng LIKE lips-lgmng,
waybill(20) TYPE c,
END OF i_lips.
DATA: BEGIN OF i_vbrk OCCURS 0,
vbeln LIKE vbrk-vbeln,
rfbsk LIKE vbrk-rfbsk, "Status for transfer to accounting
erdat LIKE vbrk-erdat, "Dt on which the record was created
fkdat LIKE vbrk-fkdat, "CHANGE MADE BY PARTHA RAHAMAN
fksto LIKE vbrk-fksto, "GOPAL:: CANCELLED DOC. DO NOT PRNT.
netwr LIKE vbrk-netwr,
fkart LIKE vbrk-fkart, "Gopal:when billng typ=s1 do not pnt 1jul
knumv LIKE vbrk-knumv,
mwsbk LIKE vbrk-mwsbk,
bzirk LIKE vbrk-bzirk,
vtweg LIKE vbrk-vtweg,
spart LIKE vbrk-spart,
END OF i_vbrk.
*structure for MARD Table by kalika
DATA : BEGIN OF itab_mard OCCURS 0,
matnr LIKE mard-matnr,
werks LIKE mard-werks,
labst LIKE mard-labst, " Valuated Unrestricted-Use Stock
lgort LIKE mard-lgort, " Storage Location
END OF itab_mard.
*structure for MARD Table by kalika
DATA:BEGIN OF i_kna1 OCCURS 0,
vbeln LIKE vbak-vbeln,
name1 LIKE kna1-name1,
kunnr LIKE kna1-kunnr,
regio LIKE kna1-regio,
bezei LIKE t005u-bezei,
land1 LIKE kna1-land1,
vkgrp LIKE vbak-vkgrp,
niels LIKE kna1-niels,
kukla LIKE kna1-kukla,
brsch LIKE kna1-brsch,
vkbur LIKE vbak-vkbur,
END OF i_kna1.
DATA:BEGIN OF i_t005u OCCURS 0,
spras LIKE t005u-spras,
land1 LIKE t005u-land1,
bland LIKE t005u-bland,
bezei LIKE t005u-bezei,
END OF i_t005u.
DATA:BEGIN OF i_tnlst OCCURS 0,
spras LIKE t005u-spras,
niels LIKE tnlst-niels,
bezei LIKE t005u-bezei,
END OF i_tnlst.
DATA:BEGIN OF itab_tkukt OCCURS 0,
spras LIKE tkukt-spras,
kukla LIKE tkukt-kukla,
vtext LIKE tkukt-vtext,
END OF itab_tkukt.
DATA : BEGIN OF itab_t016t OCCURS 0,
spras LIKE t016t-spras,
brsch LIKE t016t-brsch,
brtxt LIKE t016t-brtxt,
END OF itab_t016t.
DATA : BEGIN OF itab_tvgrt OCCURS 0,
spras LIKE tvgrt-spras,
vkgrp LIKE tvgrt-vkgrp,
bezei LIKE tvgrt-bezei,
END OF itab_tvgrt.
*DATA: i_t005u TYPE STANDARD TABLE OF t005u WITH HEADER LINE.
DATA:BEGIN OF i_kna2 OCCURS 0,
kunnr LIKE kna1-kunnr,
name1 LIKE kna1-name1, " For Ship-to-Party
END OF i_kna2.
DATA:BEGIN OF i_vbak OCCURS 0,
vbeln LIKE vbak-vbeln,
vbtyp LIKE vbak-vbtyp,
audat LIKE vbak-audat,
auart LIKE vbak-auart,
vtweg LIKE vbak-vtweg,
spart LIKE vbak-spart,
vkbur LIKE vbak-vkbur,
vkorg LIKE vbak-vkorg,
END OF i_vbak.
DATA:BEGIN OF i_adrc OCCURS 0,
vbeln LIKE vbpa-vbeln,
kunnr LIKE kna1-kunnr,
city1 LIKE adrc-city1,
name1 LIKE kna1-name1, "Name1 (Ship-to party)
END OF i_adrc.
DATA:BEGIN OF i_lfa1 OCCURS 0,
lifnr LIKE vbpa-lifnr,
vbeln LIKE vbpa-vbeln,
name1 LIKE lfa1-name1,
END OF i_lfa1.
DATA : BEGIN OF it_knumv OCCURS 0,
vbeln LIKE vbrk-vbeln,
knumv LIKE vbrk-knumv,
END OF it_knumv.
DATA : BEGIN OF it_rate OCCURS 0,
ksteu LIKE konv-ksteu, "Condition control
knumv LIKE konv-knumv, "Number of the document condition
kschl LIKE konv-kschl, "Condition type
kbetr LIKE konv-kbetr, "Rate (condition amount or percentage)
kwert LIKE konv-kwert, "Condition value
kposn LIKE konv-kposn,
kmein LIKE konv-kmein, "Sales Unit
END OF it_rate.
DATA: BEGIN OF itab_exnum OCCURS 0,
exnum LIKE j_1iexchdr-exnum, "Official Excise Document Number
exdat LIKE j_1iexchdr-exdat, "Excise Document Date
rdoc LIKE j_1iexchdr-rdoc, "Reference Document 1
status LIKE j_1iexchdr-status,
END OF itab_exnum.
DATA: BEGIN OF itab_qty OCCURS 0,
kwmeng LIKE vbap-kwmeng,
vbeln LIKE vbap-vbeln,
lgort LIKE vbap-lgort,
END OF itab_qty.
*DATA: BEGIN OF i_stloc OCCURS 0,
lgort LIKE t001l-lgort,
lgobe LIKE t001l-lgobe,
END OF i_stloc.
DATA:t_line LIKE STANDARD TABLE OF tline INITIAL SIZE 0
WITH HEADER LINE,
" itab_tvkbt LIKE STANDARD TABLE OF tvkbt WITH HEADER LINE,
w_tdname LIKE thead-tdname.
DATA : BEGIN OF itab_tvkbt OCCURS 0,
spras LIKE tvkbt-spras,
vkbur LIKE tvkbt-vkbur,
bezei LIKE tvkbt-bezei,
END OF itab_tvkbt.
DATA: BEGIN OF i_exchdr OCCURS 0,
exnum LIKE j_1iexchdr-exnum,
exdat LIKE j_1iexchdr-exdat,
rdoc LIKE j_1iexchdr-rdoc,
END OF i_exchdr.
DATA: BEGIN OF i_likp OCCURS 0,
vbeln LIKE likp-vbeln,
wadat_ist LIKE likp-wadat_ist,
traid LIKE likp-traid,
bolnr LIKE likp-bolnr,
END OF i_likp.
DATA: BEGIN OF i_mara OCCURS 0,
matnr LIKE mara-matnr,
matkl LIKE mara-matkl,
mtart LIKE mara-mtart,
labor LIKE mara-labor,
wgbez LIKE t023t-wgbez,
bismt LIKE mara-bismt,
normt LIKE mara-normt,
ferth LIKE mara-ferth,
zeinr LIKE mara-zeinr,
extwg LIKE mara-extwg,
spart LIKE mara-spart,
END OF i_mara.
DATA: BEGIN OF i_t023t OCCURS 0,
matkl LIKE t023t-matkl,
wgbez LIKE t023t-wgbez,
END OF i_t023t.
DATA : var_length(20) TYPE c,
var_breadth(20) TYPE c.
DATA: p_w_value LIKE konv-kwert.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv, " Event for Table to creater fieldcatalog
wa_fieldcat LIKE LINE OF it_fieldcat, " Work Area for table field catalog
lt_top_of_page TYPE slis_t_listheader, " Header table for top of page
i_layout TYPE slis_layout_alv . " It will fill the layout
gt_event TYPE slis_t_event. " Table Event
*DATA :
"itab_tnlst TYPE STANDARD TABLE OF tnlst WITH HEADER LINE,
" itab_tkukt TYPE STANDARD TABLE OF tkukt WITH HEADER LINE,
*" itab_t016t TYPE STANDARD TABLE OF t016t WITH HEADER LINE,
itab_tvgrt TYPE STANDARD TABLE OF tvgrt WITH HEADER LINE.
*& SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK block
WITH FRAME TITLE text-100.
SELECT-OPTIONS: s_date FOR vbrk-fkdat OBLIGATORY,
s_vkbur FOR vbak-vkbur OBLIGATORY,
s_vtweg FOR vbrk-vtweg OBLIGATORY,
s_werks FOR vbap-werks,
s_spart FOR vbrk-spart OBLIGATORY,
s_matkl FOR mara-matkl.
PARAMETERS:
r_opt3 RADIOBUTTON GROUP grp1,
r_opt2 RADIOBUTTON GROUP grp1.
r_opt4 RADIOBUTTON GROUP grp1,
r_opt5 RADIOBUTTON GROUP grp1,
r_opt1 RADIOBUTTON GROUP grp1.
SELECTION-SCREEN END OF BLOCK block.
*& INITIALIZATION
INITIALIZATION.
r_opt2 = 'X'.
*& START-OF-SELECTION.
START-OF-SELECTION.
*select data from VBRP
SELECT vbeln
posnr
matnr
aubel
fkimg
vrkme
arktx
vgbel
werks
vkgrp
fklmg
volum
vkbur
vtweg_auft
FROM vbrp
INTO TABLE i_report
WHERE "erdat IN s_date
AND spart IN s_spart
vkbur IN s_vkbur
AND vtweg_auft IN s_vtweg.
**logic for Pending, Summary & Detail Report
IF
r_opt1 EQ 'X' OR
r_opt2 EQ 'X' OR
r_opt3 EQ 'X'.
SELECT vbeln
rfbsk
erdat
fkdat
fksto
netwr
fkart
knumv
mwsbk
bzirk
vtweg
spart
FROM vbrk INTO TABLE i_vbrk
FOR ALL ENTRIES IN i_report
WHERE "vbeln = i_report-vbeln
" and
fkdat IN s_date
AND fkart IN ('ZBHR', 'ZTZT', 'ZKRP', 'ZRUD', 'ZBSR',
'ZGHT', 'ZKOL', 'ZPTN', 'ZRNC', 'ZCND',
'ZDLH', 'ZGZB', 'ZGUR', 'ZHSR', 'ZJPR',
'ZLKW', 'ZBLR', 'ZCHN', 'ZCBM', 'ZHUB',
'ZHYD', 'ZKOC', 'ZAHD', 'ZIND', 'ZMUM',
*********************MODIFICATION BY CHAKRAPANI (ADDITION OF ZVIJ AND ZHWH ) 18.05.2007
'ZNGP', 'ZPNE', 'ZRPR' , 'ZEXP', 'ZDEM','ZVIJ', 'ZHWH','JEX' )
*********************MODIFICATION BY CHAKRAPANI (ADDITION OF ZVIJ AND ZHWH ) 18.05.2007
AND vtweg IN s_vtweg
AND spart IN s_spart
AND fksto NE 'X'.
IF i_vbrk[] IS NOT INITIAL.
SELECT vbeln
posnr
matnr
aubel
fkimg
vrkme
arktx
vgbel
werks
vkgrp
fklmg
volum
vkbur
vtweg_auft
FROM vbrp
INTO TABLE i_report
FOR ALL ENTRIES IN i_vbrk
WHERE vbeln = i_vbrk-vbeln "erdat IN s_date
AND spart IN s_spart
AND vkbur IN s_vkbur
AND vtweg_auft IN s_vtweg.
ENDIF.
ELSEIF r_opt4 EQ 'X' OR
r_opt5 EQ 'X'.
SELECT vbeln
rfbsk
erdat
fkdat
fksto
netwr
fkart
knumv
mwsbk
bzirk
vtweg
spart
FROM vbrk INTO CORRESPONDING FIELDS OF TABLE i_vbrk
FROM vbrk INTO TABLE i_vbrk
FOR ALL ENTRIES IN i_report
WHERE vbeln = i_report-vbeln
AND fkart EQ 'ZEXP'
AND vtweg IN s_vtweg
AND spart IN s_spart
AND fksto NE 'X'.
ENDIF.
SORT i_vbrk BY vbeln ASCENDING.
ENDIF.
change amit by my self may be removed
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
SORT it_report BY aubel.
*select VBAP data
SELECT posnr vbeln matnr werks
kwmeng lgort
FROM vbap
INTO TABLE i_vbap
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-aubel.
ENDIF.
change amit by my self may be removed
*select data from VBKD
IF NOT i_vbap[] IS INITIAL.
SELECT vbeln posnr
FROM vbkd
INTO TABLE i_vbkd
FOR ALL ENTRIES IN i_vbap
WHERE vbeln = i_vbap-vbeln.
ENDIF.
SORT i_vbap BY vbeln ASCENDING.
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
DELETE ADJACENT DUPLICATES FROM it_report COMPARING matnr.
SORT it_report BY matnr.
SELECT
matnr
matkl
mtart
labor
bismt
normt
ferth
zeinr
extwg
spart
FROM mara
INTO TABLE i_mara
FOR ALL ENTRIES IN i_report
WHERE matnr = i_report-matnr
AND spart IN s_spart.
ENDIF.
IF NOT i_mara[] IS INITIAL.
SORT i_mara BY matnr.
SELECT matnr
labst
FROM mard
INTO TABLE itab_mard
FOR ALL ENTRIES IN i_mara
WHERE matnr = i_mara-matnr.
ENDIF.
ENDIF.
DATA : it_mara LIKE LINE OF i_mara OCCURS 0.
IF NOT i_mara[] IS INITIAL.
REFRESH it_mara.
it_mara[] = i_mara[].
DELETE ADJACENT DUPLICATES FROM it_mara COMPARING matkl.
SORT it_mara BY matkl.
SELECT matkl wgbez
FROM t023t
INTO TABLE i_t023t
FOR ALL ENTRIES IN it_mara
WHERE matkl = it_mara-matkl.
*T024X
REFRESH it_mara.
it_mara[] = i_mara[].
DELETE ADJACENT DUPLICATES FROM it_mara COMPARING labor.
SORT it_mara BY labor.
SELECT * FROM t024x
INTO TABLE itab_t024x
FOR ALL ENTRIES IN it_mara
WHERE labor = it_mara-labor
AND spras = sy-langu.
ENDIF.
*begin of change amit
LOOP AT i_vbap.
READ TABLE i_mara WITH KEY matnr = i_vbap-matnr.
IF sy-subrc = 0.
*material type & material group
i_vbap-mtart = i_mara-mtart.
i_vbap-matkl = i_mara-matkl.
ENDIF.
MODIFY i_vbap.
ENDLOOP.
*Material Group Description
*end of change amit
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
DELETE ADJACENT DUPLICATES FROM it_report COMPARING vgbel.
SORT it_report BY vgbel.
SELECT vbeln
ean11
volum
lgmng
FROM lips
INTO TABLE i_lips
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-vgbel.
ENDIF.
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY vgbel.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING vgbel.
IF i_lips[] IS NOT INITIAL.
SELECT vbeln
wadat_ist
traid
bolnr
FROM likp
INTO TABLE i_likp
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-vgbel.
ENDIF.
SORT i_lips BY vbeln ASCENDING.
LOOP AT i_lips.
REFRESH t_line.
CLEAR w_tdname.
w_tdname = i_lips-vbeln.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ZVOW'
language = sy-langu
name = w_tdname
object = 'VBBK'
TABLES
lines = t_line
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT t_line.
CONCATENATE i_lips-waybill t_line-tdline INTO i_lips-waybill.
ENDLOOP.
IF sy-subrc EQ 0.
MODIFY i_lips.
ENDIF.
ENDLOOP.
*IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY aubel.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
SELECT a~vbeln
b~name1
b~kunnr
b~regio
b~land1
a~vkgrp
b~niels
b~kukla
b~brsch
a~vkbur
FROM vbak AS a
INNER JOIN kna1 AS b
ON akunnr = bkunnr
INTO TABLE i_kna1
FOR ALL ENTRIES IN i_report
WHERE vbeln = i_report-aubel.
AND land1 = 'IN'.
*endif.
DATA : it_kna1 LIKE LINE OF i_kna1 OCCURS 0.
IF NOT i_kna1[] IS INITIAL.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY regio.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING regio.
SELECT spras
land1
bland
bezei FROM t005u
INTO TABLE i_t005u
FOR ALL ENTRIES IN it_kna1
WHERE bland = it_kna1-regio
AND spras = 'EN' AND land1 = 'IN'.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY niels.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING niels.
SELECT spras niels bezei FROM tnlst
INTO TABLE i_tnlst
FOR ALL ENTRIES IN it_kna1
WHERE niels = it_kna1-niels
AND spras = sy-langu.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY kukla.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING kukla.
SELECT spras kukla vtext FROM tkukt
INTO TABLE itab_tkukt
FOR ALL ENTRIES IN it_kna1
WHERE kukla = it_kna1-kukla
AND spras = sy-langu.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY brsch.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING brsch.
SELECT spras brsch brtxt FROM t016t
INTO TABLE itab_t016t
FOR ALL ENTRIES IN it_kna1
WHERE brsch = it_kna1-brsch
AND spras = sy-langu.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY vkgrp.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING vkgrp.
SELECT spras vkgrp bezei FROM tvgrt
INTO TABLE itab_tvgrt
FOR ALL ENTRIES IN it_kna1
WHERE vkgrp = it_kna1-vkgrp
AND spras = sy-langu.
ENDIF.
SORT i_kna1 BY vbeln ASCENDING.
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY aubel.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
SELECT a~vbeln
a~kunnr
b~city1
FROM vbpa AS a
INNER JOIN adrc AS b
ON aadrnr = baddrnumber
INTO TABLE i_adrc
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-aubel
AND parvw = 'WE'.
SORT i_adrc BY vbeln ASCENDING.
ENDIF.
DATA : it_adrc LIKE LINE OF i_adrc OCCURS 0.
IF i_adrc[] IS NOT INITIAL.
REFRESH it_adrc.
it_adrc[] = i_adrc[].
SORT it_adrc BY kunnr.
DELETE ADJACENT DUPLICATES FROM it_adrc COMPARING kunnr.
SELECT kunnr name1
FROM kna1
INTO TABLE i_kna2
FOR ALL ENTRIES IN it_adrc
WHERE kunnr = it_adrc-kunnr.
ENDIF.
SELECT a~lifnr
a~vbeln
b~name1
FROM vbpa AS a
INNER JOIN lfa1 AS b
ON alifnr = blifnr
INTO TABLE i_lfa1
FOR ALL ENTRIES IN i_report
WHERE vbeln = i_report-vgbel
AND parvw = 'SP'.
SORT i_lfa1 BY vbeln ASCENDING.
change amit by my self may be removed
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY vbeln.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING vbeln.
SELECT exnum
exdat
rdoc
status
FROM j_1iexchdr
INTO TABLE itab_exnum
FOR ALL ENTRIES IN it_report
WHERE rdoc = it_report-vbeln AND status = 'P' OR status = 'C' .
ENDIF.
change amit by my self may be removed
change amit by my self may be removed
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY aubel.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
SELECT kwmeng
vbeln
lgort
FROM vbap
INTO TABLE itab_qty
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-aubel.
ENDIF.
change amit by my self may be removed
SORT itab_qty BY vbeln.
CHECK NOT i_vbrk[] IS INITIAL.
SORT i_report BY vbeln.
DATA : t_vbrk LIKE LINE OF i_vbrk OCCURS 0.
REFRESH t_vbrk.
t_vbrk[] = i_vbrk[].
SORT t_vbrk BY knumv.
DELETE ADJACENT DUPLICATES FROM t_vbrk COMPARING knumv.
SELECT ksteu
knumv
kschl
kbetr
kwert
kposn
kmein
FROM konv
INTO TABLE it_rate
FOR ALL ENTRIES IN t_vbrk
WHERE knumv = t_vbrk-knumv
AND kschl IN ('ZR00', "Basic Price
'ZR01', "Basic Price
'ZR02', "Basic Price
'ZR03', "Basic Price
'ZR04', "Basic Price
'ZR05', "Basic Price
'JEXP', "Excise
'JECS', "ED
'ZG03', "Freight
'ZG04', "Freight
'JCST', "CST
'JLST', "LST
'ZDEV', "Dev Tax
'Z001', "Discount
'Z002', "Discount
'Z003', "Discount
'Z004', "Discount
'Z005', "Discount
'Z006', "Discount
'Z007', "Discount -
Error (Short Dump) while posting any Material document
Hello All Experts,
I am facing an error (short dump) while doing all material document related transactions (for example MIGO,MB1A etc) . I am getting the below message:-
Short text of error message:
Document number 1000 5000000000 2009 was already assigned
Earlier, I had posted some material documents using the same transactions.
Kindly help
Regards,
AtulHi Atul,
Please use T-code OMBT to check the number range status of material document. You can click on the 'Intervals' button to check the 'Current number', the last material document number the system was created so far. Try to change the 'Current number' to a number greater than 5000000001, save the change, and post material document again.
Hope it can solve your issue.
Cheers -
Short Dump while executing ALV Grid.
Hi All,
I m getting a short dump while trying to execute an ALV.
The dump exception is of type
CX_SY_DYN_CALL_ILLEGAL_TYPE class.
The message displayed is : " Call to form 'GI_FIELDCAT' is incorrect .The actual parameter in PERFORM is different data type than requested for form GI_FIELDCAT " .
The part of programe included is as follows:
FORM build_fieldcat .
PERFORM gi_fieldcat USING 'MBLNR' text-014 '1' '20'.
PERFORM gi_fieldcat USING 'ZEILE' text-005 '2' '4'.
PERFORM gi_fieldcat USING 'MATNR' text-006 '3' '18'.
PERFORM gi_fieldcat USING 'MAKTX' text-028 '4' '40'.
PERFORM gi_fieldcat USING 'MATKL' text-029 '5' '40'.
PERFORM gi_fieldcat USING 'BUDAT' text-027 '6' '10'.
PERFORM gi_fieldcat USING 'MENGE' text-026 '7' '9'.
PERFORM gi_fieldcat USING 'DMBTR' text-025 '8' '13'.
PERFORM gi_fieldcat USING 'WAERS' text-011 '9' '5'.
PERFORM gi_fieldcat USING 'RSNUM' text-012 '10' '10'.
PERFORM gi_fieldcat USING 'PSPHI' text-013 '11' '10'.
ENDFORM. " build_fieldcat
FORM gi_fieldcat USING fieldname TYPE slis_fieldcat_alv-fieldname
colmname TYPE slis_fieldcat_alv-seltext_m
colmpos TYPE slis_fieldcat_alv-col_pos
outputlen TYPE slis_fieldcat_alv-outputlen.
wa_fieldcat-fieldname = fieldname.
wa_fieldcat-seltext_m = colmname.
wa_fieldcat-col_pos = colmpos.
wa_fieldcat-outputlen = outputlen.
wa_fieldcat-
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " gi_fieldcat
Can ayone gimmi a solution for the same.Hi,
Try to change ur code like the below.
Attached: sample code
Building field catalog
PERFORM modify_catlog USING:
'GT_OUTPUT' 'AUART' text-t02 '1',
'GT_OUTPUT' 'KUNNR' text-t03 '2',
'GT_OUTPUT' 'NAME' text-t04 '3',
'GT_OUTPUT' 'KWMENG' text-t05 '4',
'GT_OUTPUT' 'VRKME' text-t06 '5',
'GT_OUTPUT' 'LFIMG' text-t07 '6',
'GT_OUTPUT' 'GEWEI' text-t08 '7',
'GT_OUTPUT' 'VOLUM' text-t09 '8',
'GT_OUTPUT' 'VOLEH' text-t10 '9',
'GT_OUTPUT' 'BRGEW' text-t11 '10',
'GT_OUTPUT' 'UOMGW' text-t12 '11',
'GT_OUTPUT' 'VARCE' text-t13 '12',
'GT_OUTPUT' 'UOMVR' text-t14 '13'.
FORM modify_catlog USING pa_tabname TYPE string
pa_field TYPE string
pa_text TYPE string
pa_pos TYPE string.
CLEAR gs_fieldcatalog.
*Modifying field catalog
gs_fieldcatalog-col_pos = pa_pos.
gs_fieldcatalog-fieldname = pa_field.
gs_fieldcatalog-tabname = pa_tabname.
gs_fieldcatalog-seltext_m = pa_text.
APPEND gs_fieldcatalog TO gt_fieldcatalog.
CLEAR gs_fieldcatalog.
l_repid = sy-repid.
To call function to display ALV output
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
it_fieldcat = gt_fieldcatalog
TABLES
t_outtab = gt_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000 WITH text-t16.
ENDIF.
Reward if helpful.
Regards,
Ramya
Maybe you are looking for
-
My App Updates page -- sort order gone?
In the last week or so, I've noticed that the app listing on the "My App Updates" page seems to have gone from sorted by app name to a nonsense scrambled mess. Has anyone else noticed this or is it something in my version of iTunes? I wonder whether
-
Hi All, We have a peculiar issue with fv60(vendor invoice).We do save as completed for a document so that it is released and then the approver would post the document using fbv0.However now when the user does save as completed still the document does
-
IPMA Invalid username or password
hi, im having this problem with IPMA, the user tries to log on but she gets that message "invalid username or password", the user is integrated with LDAP ,and she succesfully logs on the computer this is the trace result from IPMA, ¿any idea? 0: Mon
-
I just lost my address book folders all except one. Any help available?
I was inputting information into an address in my address folder. I sent and email to this person and went back to the address book and Only one folder was available. Where did my other folders go? Can I get them back? I had a lot of information in m
-
Regarding OCA and OCP certification
I have a Master's degree in computer science and i know the basics of sql and pl/sql and right now i am going to train up on pl/sql. I want to start a career as pl/sql developer and if we do certification it can be some added advantage so i am thinki