1

I have a requirement from the customer that involves presenting information in transaction VA42 (contracts) that are saved in a number of custom tables. The data is not avaliable via an append structure on VBAK and I'm not able to make this change myself.

I've registered the screen 8309 and started to add my fields to it. As such, I've created a PBO module in order to have a place to map the data to the fields in the screen. I've placed a breakpoint in the module, it's being triggered and the data I want to present is being retreived. Nothing I've done so far though writes it to the field in the user exit.

What I've tried:

  • I gave the fields a 'parameter id' so I can use GET and SET PARAMETER ID. This doesn't work, the fields remain empty after using this statement.

http://hastebin.com/qinerexola.sql

  • I gave the fields a normal name instead of naming the field on the structure/name and tried with DYNP_VALUES_UPDATE to map the data to the supplied field. Sy-subrc returns 0 but the field isn't updated.

http://hastebin.com/anakirikah.sql

  • I gave the fields a name of (structure)-(field) and tried using the above function module. This also didn't work.
  • I looped at screen and saw the name of my field come by but this structure has no information on it's value, or at least that I can see.

I don't have the option to append fields to the VBAK, is it still possible to populate the fields of extended screens with custom data from customer tables?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • Welcome to SO! Are you declaring `FIELD contract-req_ref.` (or `FIELD ZSD_VA_ADD_FIELDS-REF_REGEX.`, whichever it is in your case) before making the call to the module? This introduces the field value into scope so that you may read and write to it within the module. – gkubed Nov 23 '16 at 15:54
  • 1
    Your hastebins are empty. Paste the code here. – Suncatcher Nov 23 '16 at 18:19
  • For the field to show the value it needs to also be maintained as a global field in the main program, in your case SAPMV45A. From the description you give of the problem and what you have tried it is not clear if this is the case, the source of you module would help. You can create the variable in MV45ATZZ. – Gert Beukema Nov 23 '16 at 18:49
  • @gkubed, the FIELD statement has no effect in PBO. – Gert Beukema Nov 23 '16 at 18:52
  • @GertBeukema Oops! Thanks, I was thinking PAI. – gkubed Nov 23 '16 at 18:54
  • @Suncatcher they work for me. I have not made the variables global or defined them in a field. I've only created the screen thus far. I'll try MV45ATZZ – user7199471 Nov 24 '16 at 10:13
  • @user7199471, now they work, but anyway you should post it in question body. Read the rules: [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) – Suncatcher Nov 24 '16 at 10:33
  • @Suncatcher next time perhaps. – user7199471 Nov 24 '16 at 11:00
  • @GertBeukema Can you see the hastebins now? The module code in the screen is nothing more than a call to the PBO function. In that it's nothing more than a selection on a Z table. I've added the variable to MV45ATZZ. I've tried renaming the field the same as the variable in MV45ATZZ and then retrying both `SET PARAMETER` and `DYNP_VALUES_UPDATE` but none work. – user7199471 Nov 24 '16 at 11:36
  • Spoke too soon, fields are filled. Thanks for the help. @GertBeukema you can post it as an answer so I can give credit. – user7199471 Nov 24 '16 at 11:41

1 Answers1

0

For the field to show the value it needs to also be maintained as a global variable in the main program, in your case SAPMV45A. From the description you give of the problem and what you have tried it is not clear if this is the case, the source of your module would help. You can create the variable in MV45ATZZ.

Gert Beukema
  • 2,510
  • 1
  • 17
  • 18