How to reverse POD status and PGI status? - abap

Can anyone suggest function module to reverse POD status and PGI status?
I used WS_DELIVERY_UPDATE_2 to update POD status and PGI from A or B to C, but how to reverse it?
Is it possible to reverse POD status from C to A just like a VLPOD and reverse PGI status from C to A just like a VL09.
This code updates POD status but I don't know how to reverse it
*** updating PGI status ***
ls_vbkok-wabuc = 'X'.
ls_vbkok-wadat_ist = sy-datum.
ls_vbkok-wauhr = sy-uzeit.
ls_vbkok-wadat = plandate.
ls_vbkok-kzwad = 'X'.
CLEAR: ls_vbkok-kzpod, ls_vbkok-podat, ls_vbkok-potim.
CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING
vbkok_wa = ls_vbkok
synchron = 'X'
commit = 'X'
delivery = ls_likp-vbeln
update_picking = 'X'
TABLES
prot = lt_prot.
*** updating POD status ***
ls_vbkok-kzpod = 'D'.
ls_vbkok-podat = sy-datum.
ls_vbkok-potim = sy-uzeit.
CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING
vbkok_wa = ls_vbkok
synchron = 'X'
* NO_MESSAGES_UPDATE_1 = ' '
commit = 'X'
delivery = ls_likp-vbeln
* update_picking = 'X' "test stock
* nicht_sperren_1 = 'Y'
TABLES
vbpok_tab = lt_vbpok
prot = lt_prot.
CLEAR: lt_vbpok, ls_vbpok, lt_prot, ls_likp.
Best regards

I recently had an issue where I used the module function WS_DELIVERY_UPDATE_2 and I had to reverse the delivery to status 'A' for my tests.
To reverse the status I executed transaction VL09.
After I read your issue I checked the code of that transaction, which is RVV50L09, and I found the module function WS_REVERSE_GOODS_ISSUE.
Hope it helps.

Check POD_STATUS_MAINTAIN subroutine in FV50XFPD include.
It uses the following FM for reverting the POD status:
lips-kzpod = 'B'.
CALL FUNCTION 'LIPS_STATUS_MAINTAIN'
EXPORTING
f_likp = likp
f_posnr = lips-posnr
land1_we = kuwev-land1
TABLES
fxlips = xlips
fxvbapf = xvbapf
fxvbup = xvbup
fyvbup = yvbup
fxvbfa = xvbfa.
Regarding PGI, ask the separate question.

Related

Requested module experienced an error while loading - Server - Data:11

Yeah So, I'm coding a Roblox game and this script gets an error every time, I even restarted roblox studio to try fixing it but it didn't work and I tried messing around with the code but I couldn't figure it out, can someone please help?
Script:
local PetModule = require(ServerModules.PetModule)
Module Code:
local module = {}
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Pet = ReplicatedStorage.Pet
function module.EquipPet(Player, PetName)
local PetModel = Pet:FindFirstChild(PetName)
if PetModel then
PetModel = PetModel:Clone()
PetModel.Parent = workspace.Pet:FindFirstChild((Player.Name))
if Player then
local Character = Player.Character
if Character then
if not Character.HumanoidRootPart:FindFirstChild("PetAttachments") then
local PetAttachments = Instance.new("Folder")
PetAttachments.Name = "PetAttachments"
PetAttachments.Parent = Character.HumanoidRootPart
local PetAttachments = Character.HumanoidRootPart:FindFirstChild("PetAttachments")
if PetAttachments then
local att0 = Instance.new("Attachment")
att0.Name = "Attachment1"
att0.Position = PetModel:FindFirstChild("AttachmentPosition").Value
att0.Parent =Character.HumanoidRootPart
local att1 = Instance.New("Attachment")
att1.Name = "Attachment2"
att1.Parent = PetModel.PrimaryPart
local AlignPosition = Instance.new("AlignPosition")
AlignPosition.Attachment0 = att0
AlignPosition.Attachment1 = att1
AlignPosition.RigidityEnabled = false
AlignPosition.MaxForce = PetModel.MaxForce.Value
AlignPosition.Responsiveness = PetModel.Responsiveness.Value
AlignPosition.Parent = PetModel.PrimaryPart
local AlignOrientation = Instance.new("AlignOrientation")
AlignOrientation.Attachment0 = att0
AlignOrientation.Attachment1 = att1
AlignOrientation.RigidityEnabled = false
AlignOrientation.MaxTorque = PetModel.MaxForce.Value
AlignOrientation.Responsiveness = PetModel.Responsiveness.Value
AlignOrientation.Parent = PetModel.PrimaryPart
game:GetService("RunService").Heartbeat:Connect(function()
att0.Position = PetModel.AttachmentPosition.Value
AlignPosition.MaxForce = PetModel.MaxForce.Value
AlignOrientation.MaxTorque = PetModel.MaxForce.Value
AlignPosition.Responsiveness = PetModel.Responsiveness
end)
end
end
end
end
end
function module.UnequipPet(Player)
end
function module.UnequipAllPet(Player)
end
return module
end
If anyone could help me fix this it would be great.
make sure to put "return module" at the end!
return module
is within the function. Try to put it free at the end of the code and...
I'm not sure, but I think it's because you're creating an event connection within module, I had this problem right now. I just stopped creating events within the Module and the problem stopped.
Try removing this from de Code.
game:GetService("RunService").Heartbeat:Connect(function()
att0.Position = PetModel.AttachmentPosition.Value
AlignPosition.MaxForce = PetModel.MaxForce.Value
AlignOrientation.MaxTorque = PetModel.MaxForce.Value
AlignPosition.Responsiveness = PetModel.Responsiveness
end)

BAPI or FM for Promise to pay creation?

I'm working with Promises to pay in UDM_SUPERVISOR transaction and I need to upload Promise to pay data using BAPI/FM from an excel file.
There is a data migration template which will include all the required fields for the creation of a Customer Promise To Pay in the system.
The migration will happen using LTMC migration cockpit tool. Is there any BAPI/FM I can use for uploading Promise To Pay?
Try function modules from FDM_P2P_SERVICES group which is Promise to Pay API.
For example UDM dashboard calls FDM_P2P_CREATE FM under the hood
ls_p2p_partner-obj_type = 'KNB1'.
ls_p2p_partner-obj_key = '0030000001CA09'.
ls_p2p_attr-fin_comp_code = "CA09".
ls_p2p_attr-fin_customer = '0030000001".
ls_p2p_attr-fin_p2p_curr = 'CAD".
ls_p2p_attr-fin_p2p_date = ls_p2p_attr-fin_p2p_due_date = "20220530".
ls_p2p_attr-fin_promised_by = 'Sandeep Phogat".
ls_p2p_attr-fin_contact_tel = "9058262323".
ls_p2p_attr-fin_contact_key = "0000000003".
APPEND ls_p2p_attr TO lt_p2p_attr.
ls_gen_inv_for_partner-obj_type = "BSEG".
ls_gen_inv_for_partner-obj_key = "CA0901000001752017001".
ls_gen_inv_for_partner-open_amount = "0.75".
ls_gen_inv_for_partner-max_p2p_amount = "0.75".
ls_gen_inv_for_partner-assigned_p2p_amount = "0.75".
ls_gen_inv_for_partner-p2p_curr = "CAD".
ls_gen_inv_for_partner-due_date = "20170515".
ls_gen_inv_for_partner-overdue_by = "1841".
ls_gen_inv_for_partner-case_type = "CAPP".
APPEND ls_gen_inv_for_partner TO lt_gen_inv_for_partner.
CALL FUNCTION 'FDM_P2P_CREATE'
EXPORTING
is_p2p_partner = ls_p2p_partner
it_p2p_attr = lt_p2p_attr
it_p2p_invoice = lt_gen_inv_for_partner
IMPORTING
et_p2p_created = lt_p2p_crea_for_partner
EXCEPTIONS
get_number_failure = 1
case_interface_failure = 2.
If you want to upload promises from file, please check /HEX/UPLOAD_P2P standard report.

Create outbound delivery with different shipping address

I've searched for days and found nothing. My problem is, that I have to create a return delivery out of an QM-Report. Everything works fine.
However, the customer wants to change the delivery address manually.
Flow:
QM02 (QM-Report) => Return order with BAPI_PO_CREATE1 (different address works fine) => Delivery with BAPI_OUTB_DELIVERY_CREATE_STO (different address from PO not working)
My question:
Is there a possibility to change the delivery address of the outbound delivery? Do I have to implement a BADI or is there a simple solution?
If anything is missing, I will update the question.
Function BAPI_OUTB_DELIVERY_CREATE_STO allows you to create deliveries from PO but you can't handle many of the delivery fields.
After you have created the deliveries, you should use WS_DELIVERY_UPDATE_2 function to update any field.
This is not a BAPI, and consequently it is not well documented, but is widely used for these changes.
Best regards
UPDATE
Here's a snippet:
ls_vbkok-vbeln_vl = <delivery number>.
ls_partners-vbeln_vl = ls_vbkok-vbeln_vl.
ls_partners-parvw = 'WE'.
ls_partners-parnr = <partner number>.
ls_partners-updkz_par = 'U'.
ls_partners-stras = <new street address>.
append ls_partners to lt_partners.
call function 'WS_DELIVERY_UPDATE_2'
exporting
vbkok_wa = ls_vbkok
synchron = 'X'
commit = 'X'
delivery = ls_vbkok-vbeln_vl
tables
vbpok_tab = lt_vbpok
it_partner_update = lt_partners
prot = lt_prot.
if lt_prot[] is not initial.
" handle error message here
endif.
if you need to make a commit and you can do it after the 'WS_DELIVERY_UPDATE_2' , try to call it in a new task.
for exemple :
call function 'WS_DELIVERY_UPDATE_2' STARTING NEW TASK task
PERFORMING return_fm ON END OF TASK
exporting
vbkok_wa = ls_vbkok
synchron = 'X'
commit = ' '
delivery = ls_vbkok-vbeln_vl
tables
vbpok_tab = lt_vbpok
it_partner_update = lt_partners
prot = lt_prot.
*your code
WAIT UNTIL get_executed <> space.
FORM return_fm USING i_taskname.
*your code
get_executed = 'X'.
ENDFORM.

How do you configure UDPInput to work with heka-flood udp test

I am trying to test sending data to heka's UDPInput with no success. I decided to try to use the heka-flood tool to mimic UPD traffic also with no success. I am using 0.10 version of heka. My heka.toml :
[UdpInput]
address = "127.0.0.1:4880"
net = "udp"
splitter = "udp_splitter"
decoder = "ProtobufDecoder"
set_hostname = true
# I have also tried not setting this as well
[udp_splitter]
type = "HekaFramingSplitter"
[ProtobufDecoder]
[LogOutput]
type = "LogOutput"
message_matcher = "Logger == 'UdpInput'"
encoder = "PayloadEncoder"
and my flood.toml:
[udp_proto]
ip_address = "127.0.0.1:4880"
sender = "udp"
pprof_file = ""
encoder = "protobuf"
num_messages = 1000
corrupt_percentage = 0.0001
signed_percentage = 0.00011
variable_size_messages = false
ascii_only = true
max_message_size = 32000
If I add another input, like say a log tailer and add it to the message matcher for the LogOutput, those messages end up being logged out. I never see anything from the UpdInput. What am I doing wrong?

parse_failed error occured in augeas,why this error occur and how to fix this issue?

I want to edit file "myfileDB.properties" using augeas. so used Properties.lns.
but it made error "parse_failed"and some time "parse_skel_failed". explain the root cause of this error and solve this issue.
augtool> print /augeas/files/root/yog/myfileDB.properties/error/
/augeas/files/root/yog/myfileDB.properties/error = "parse_failed"
/augeas/files/root/yog/myfileDB.properties/error/pos = "17835"
/augeas/files/root/yog/myfileDB.properties/error/line = "318"
/augeas/files/root/yog/myfileDB.properties/error/char = "0"
/augeas/files/root/yog/myfileDB.properties/error/lens = "/usr/share /augeas/lenses/dist/properties.aug:50.25-.100:"
/augeas/files/root/yog/myfileDB.properties/error/message = "Iterated lens matched less than it should"
/augeas/files/root/yog/myfileDB.properties/error = "parse_skel_failed"
/augeas/files/root/yog/myfileDB.properties/error/pos = "4844943"
/augeas/files/root/yog/myfileDB.properties/error/line = "53707"
/augeas/files/root/yog/myfileDB.properties/error/char = "0"
/augeas/files/root/yog/myfileDB.properties/error/lens = "/usr/share/augeas/lenses/dist/simplevars.aug:34.10-.46:"
/augeas/files/root/yog/myfileDB.properties/error/message = "Iterated lens matched less than it should"