E9.2 F4211FSEditLine Affecting More Fields Than Intended

BookClub

Member
Hello, I am running into problems using F4211FSEditLine. I'm using it to change a few fields on F4211 such as location in a report. I'm using BeginDoc->EditLine->EndDoc and after EndDoc finishes I am finding many fields in both F4201 and F4211 to have been blanked and the pricing to be changed. I am assuming the blanking is due to not all of the ~200 fields in EditLine being populated. I am assuming that there are options in one of these functions that I am missing that are causing this behavior. Below is an example of one of these calls:
Code:
2047          F4211 Begin Document
                 VA evt_Myvar_CANextNumber_N001 -> BF mnCMJobNumber
                 "C" -> BF cCMDocAction
                 "1" -> BF cCMProcessEdits
                 "MyComputer" -> BF szCMComputerID
                 "2" ->  BF cCMUpdateWriteToWF
                 "00001" -> BF szOrderCo
                 BC Document (Order No, Invoice, etc.) (F4211)(DOCO) -> BF mnOrderNo
                 BC Order Type (F4211)(DCTO) -> BF szOrderType
                 BC Business Unit (F4211)(MCU) -> BF szBusinessUnit
                 BC Address Number (F4211)(AN8) -> BF mnAddressNumber
                 BC Address Number - Ship To (F4211)(SHAN) -> BF mnShipToNo
                 <Blank> -> BF cWKSourceOfData
2048          F4211  Edit Line
                 VA evt_Myvar_CANextNumber_N001 -> BF mnCMJobNo
                 "C" -> BF cCMLineAction
                 "1" -> BF cCMProcessEdits
                 "2" -> BF cCMWriteToWFFlag
                 "MyComputer" -> BF szCMComputerID
                 "00001" -> BF szOrderCo
                 BC Document (Order No, Invoice, etc.) (F4211)(DOCO) -> BF mnOrderNo
                 BC Order Type (F4211)(DCTO) -> BF szOrderType
                 VA evt_MyVar_LocationChange_LNID -> BF mnLineNo
                 BC Business Unit (F4211)(MCU) -> BF szBusinessUnit
                 BC Address Number - Ship To (F4211)(SHAN) -> BF mnShipToNo
                 BC 2nd Item Number (F4211)(LITM) -> BF szItemNo
                 VA evt_Myvar_CaseNewLoc_LOCN -> BF szLocation
                 BC Status Code - Last (F4211)(LTTR) -> BF szLastStatus
                 BC Status Code - Next (F4211)(NXTR) -> BF szNextStatus
                 VA evt_Myvar_CasesAtLOCN_SOQS -> BF mnQtyShipped
                 "CA" -> BF szTransactionUOM
                 "EP4210" -> BF szCMProgramID
                 "WLZ0001" -> BF szCMVersion
2049          F4211 End Document
                 VA evt_Myvar_CANextNumber_N001 -> BF mnCMJobNo
                 BC Document (Order No, Invoice, etc.) (F4211)(DOCO) -> BF mnSalesOrderNo
                 "MyComputer" -> BF szCMComputerID
                 BC Order Type (F4211)(DCTO) -> BF szOrderType
                 BC Order Company (Order Number) (F4211)(KCOO) -> BF szKeyCompany
                 "2" -> BF cCMUseWorkFiles

I have also tried the combination of ProcessEdits 2 and 3 for BeginDoc and EditLine respectively but the behavior has remained the same. Any help or pointers are much appreciated!
 

Scott Beebe

Reputable Poster
You need to put values for all the fields. If you don't have all the values you will need to get the current values of all the fields. If doing in NER it will be cumbersome due to the number of variables you have to create for each field in F4211 that you will have to pass in for the edit line.

One good option is to put this edit line function into a C function. I think there is an action code of 'I' (Inquire) to retrieve the current data line. I didn't look at this one, but other MBF have this option. If you can to the I action code the edit line DSTR will be return filled with all the current values. Set the ones you are changing and then pass that DSTR back into the Edit Line with your 'C' action.

If the 'I' action code isn't available it may still be easier to do in C.
 

BOster

Legendary Poster
I agree with Scott. The A/B MBF for example has an 'I' action so it is easy to call with 'I', change the value you want then call with the action to update. Unfortunately the Sales Order MBF doesn't implement an 'I' action code. I have a BSFN that I have used for years that takes pointers to sales table records and pointers to SOE MBF data structures and fills them all out so you may want to consider developing something similar since it has saved me countless hours when I needed to do exactly what you are describing. My BSFN does a param by param mapping to table fields but since I created my BSFN JDE also released various C APIs to do something similar. I have used JDEDM_LoadDSfromDS which loads params from one BSFN DS to another, but there is also one that loads params from a table record to BSFN DS based on DD alias. The DD aliases will need to be identical between BSFN DS and table record so it won't 100% load everything correctly into the BSFN DS but it may keep you from having to hand code a lot of the params/fields manually.
 
Top